VMGX
A lightweight, human-readable data format for structured records, rich metadata and long-term digital preservation.
@vmgx 1.0
# A publication record
@id: "vmg-pub-0001"
@type: "publication"
@created: 2026-11-14T22:30:00+01:00
title: "Northern Light"
authors: ["Alex Morgan"]
published: 2027-03-01
pages: 248
website: <https://example.com/books/northern-light>
summary: """
A photo book about "slow light" on the coast.
It follows one harbor through a full year of seasons.
"""
The simplicity of JSON, with what archives and publishers need
JSON is clean, but it has no comments, no dates, no links and no place for metadata. VMGX keeps JSON's shape and adds exactly those things, and nothing more.
Readable first
No outer braces, no quotes around keys, commas optional between lines. A person can read and edit a file without tools.
Real dates
2027-03-01 and 2026-11-14T22:30:00+01:00 are their own types, checked when the file is read. An impossible date is an error.
Links as links
Write <https://…> and tools know it is a web address, ready to check or to show as a hyperlink.
Metadata built in
Keys that start with @, such as @id, @source and @license, describe the record they sit in.
Comments and long text
Annotate with #. Write summaries, captions and bios over several lines in """ text blocks.
Works with JSON
Convert to plain JSON for any system, or to typed JSON when dates and links must survive the round trip. Your data is never locked in.
The whole language on one page
VMGX 1.0 has eleven value types and a handful of rules. If you know JSON, you can read it already.
Documents and entries
- A file is an object; its outer braces are left out.
- Each entry is
key: value. - Entries are separated by a new line or a comma. A trailing comma is allowed.
- A value starts on the same line as its key. Objects and lists may then span several lines.
- The header
@vmgx 1.0is optional but recommended.
@vmgx 1.0
name: "Vegte Media Group"
founded: 2026, active: true
address: {
city: "Lisbon"
country: "PT"
}
tags: ["media", "archive", "publishing"]
Value types
| Type | Example |
|---|---|
| Text | "Lisbon" |
| Text block | """…""" |
| Integer | 248, -3 |
| Decimal | 19.95, 1.5e3 |
| Boolean | true, false |
| Null | null |
| Date | 2027-03-01 |
| Date-time | 2026-11-14T22:30:00+01:00 |
| Link | <https://example.com> |
| Object | { key: "value" } |
| List | [1, 2, 3] |
Text is always in quotes. That one rule keeps the format unambiguous: true, 2027-03-01 and 248 can never be mistaken for words.
name: "Alex" # correct name: Alex # error: text must be in quotes
Keys
- Bare keys use letters, digits,
_and-, starting with a letter or_. - Quoted keys allow any text, including spaces.
- Metadata keys start with
@. - Keys are case-sensitive, and each key appears only once per object.
first-name: "Alex" isbn_13: "978-0-00-000000-0" "place of birth": "Lisbon" @id: "person-001"
Text and text blocks
Quoted text stays on one line and supports the JSON escapes (\n, \t, \" and others), plus \u{1F600} for any Unicode character.
Text blocks hold text over several lines with no escaping. The line breaks just inside the quotes and the shared indentation are removed, so blocks can be indented neatly.
motto: "Verba volant,\nscripta manent."
bio: """
Photographer and editor.
Writes about "slow travel"
without a single escape.
"""
Dates, times and links
- Dates:
YYYY-MM-DD. Impossible dates such as2026-02-30are rejected. - Date-times follow ISO 8601, with optional seconds and a time zone:
Zor an offset such as+01:00. - For archiving, always include the time zone.
- Links are URLs or URIs in angle brackets, without spaces.
born: 1985-06-15 scanned: 2026-11-14T09:15:00+01:00 published: 2027-03-01T00:00Z homepage: <https://example.com> contact: <mailto:info@example.com> book: <urn:isbn:9780000000000>
Metadata
A key that starts with @ describes the object it sits in, rather than being part of its content. At the top of a file it describes the whole document.
| Key | Meaning |
|---|---|
@id | Unique identifier |
@type | Kind of record |
@created | When it was created |
@modified | When it last changed |
@author | Who is responsible for it |
@source | Where it came from (provenance) |
@license | Usage rights |
@lang | Language code |
@version | Version of the record |
- Metadata applies only to the object it sits in. Nested objects do not inherit it.
- In JSON,
@keys keep their names, such as"@id", and come back unchanged. - Tools must keep
@keys they don't recognize. @createdand@modifiedshould be date-times with a time zone.@vmgxis reserved for the header and cannot be used as a key.
@id: "archive-2026-0412"
@type: "letter"
@source: "Family collection, box 3"
@license: "CC BY 4.0"
@lang: "en"
sender: "M. Clarke"
written: 1953-09-02
transcription: """
Dear family,
...
"""
Comments
# starts a comment that runs to the end of the line. It can stand on its own line or follow a value. A # inside text is just text.
# Catalog entry, checked by hand pages: 248 # including front matter edition: "#2" # this # is part of the text
Conversion, versions and validation
The details that decide whether a file read today still reads the same in twenty years.
Converting to JSON
VMGX converts to JSON in two modes. Comments are never carried into JSON in either mode.
| Mode | Dates and links become | Round trip |
|---|---|---|
| Plain JSON data-preserving | Ordinary strings | Values survive; types come back as text |
| Typed JSON type-preserving | {"@date": …}, {"@datetime": …}, {"@link": …} | Values and types survive |
Use plain JSON for systems that only need the values. Use typed JSON when the data will come back into VMGX.
// Source
published: 2027-03-01
website: <https://example.com>
// Plain JSON
"published": "2027-03-01",
"website": "https://example.com"
// Typed JSON
"published": { "@date": "2027-03-01" },
"website": { "@link": "https://example.com" }
Versions and compatibility
- The header gives the language version as
major.minor. A file without a header is version 1.0. - Major versions may change the rules. A parser must reject a major version it does not support.
- Minor versions only add. A 1.x parser reads any 1.x file and reports an error only where it meets syntax it does not know.
- Specification revisions such as 1.0.1 clarify the rules without changing the language. Files still say
@vmgx 1.0.
@vmgx 1.0 # read by every 1.x parser
@vmgx 1.3 # read by a 1.0 parser, if it uses
# only syntax that 1.0 knows
@vmgx 2.0 # rejected by a 1.x parser
@vmgx 1.0.1 # error: the header has no patch number
Validation
A parser must reject the whole file, and should report the line and column, when it finds:
- unquoted text, a missing
:, or a missing value - a duplicate key in one object, metadata keys included
- unclosed text, text blocks, links, objects or lists
- an impossible date or time, or more than six decimals in a time
NaN, infinity, or a number too large to store- a control character, or invalid Unicode such as an unpaired surrogate
- objects and lists nested more than 256 levels deep
- an unsupported major version, or
@vmgxused as a key
Date-times are always written in one canonical form: seconds included, fractions as six digits, and Z for UTC. 2026-01-01T09:00Z is written back as 2026-01-01T09:00:00Z.
The conformance suite holds 16 valid files with their expected results and 42 invalid files that must be rejected. A parser conforms to VMGX 1.0 when it passes every case. Both reference parsers pass all 58.
Try VMGX in your browser
Type or paste VMGX into the input box. The result updates as you type, and errors point to the exact line and column. Nothing leaves your browser.
VMGX next to JSON, YAML, TOML and XML
VMGX does not try to replace any of them. It is built for one job: readable records with typed dates, links and metadata. For configuration files, TOML and YAML remain good choices.
Swipe the table sideways to see all formats.
| Feature | JSON | YAML | TOML | XML | VMGX |
|---|---|---|---|---|---|
| Comments | No | Yes | Yes | Yes | Yes |
| Text always quoted, so no type guessing | Yes | No, unquoted words can turn into booleans or numbers | Yes | Everything is text | Yes |
| Indentation matters | No | Yes | No | No | No |
| Multi-line text | Escapes only | Yes | Yes | Yes | Yes |
| Native dates | No | Depends on the parser | Yes | With a schema | Yes |
| Native links | No | No | No | With a schema | Yes |
| Metadata on records | No convention | No convention | No convention | Attributes | @ keys |
| Deeply nested records | Easy | Easy | Awkward | Easy | Easy |
| Best suited for | Data exchange | Configuration | Configuration | Structured documents | Records and archives |
| Ecosystem | Universal | Large | Growing | Mature | New |
Use VMGX in your own work
JavaScript
One file, no dependencies, with TypeScript types. Works in Node.js and in the browser.
npm install @vmgx/vmgx
const VMGX = require("@vmgx/vmgx"); // or: <script src="vmgx.js"></script>
const record = VMGX.parse(text);
record.published.toDate(); // a JavaScript Date
record.website.href; // "https://..."
VMGX.stringify(record); // back to VMGX
VMGX.toJSON(text); // plain JSON
VMGX.toJSON(text, { typed: true }); // typed JSON
VMGX.fromJSON(json, { typed: true }); // JSON → VMGX
Python
One module, standard library only. Python 3.11 or later.
pip install vmgx
import vmgx
record = vmgx.load(open("record.vmgx", encoding="utf-8"))
record["published"] # datetime.date(2027, 3, 1)
vmgx.dumps(record) # back to VMGX
vmgx.to_json(record) # plain JSON
vmgx.to_json(record, typed=True) # typed JSON
Command line
Installed with the Python package.
vmgx check record.vmgx vmgx to-json record.vmgx [--typed] vmgx from-json data.json [--typed] vmgx fmt record.vmgx
Visual Studio Code
Syntax colors, live error checking, formatting and JSON conversion. In VS Code, open the Extensions view and search for VMGX, or install it from the command line:
code --install-extension vegtemediagroup.vmgx
Downloads
File details
| Extension | .vmgx |
| Media type | application/vnd.vmg.vmgxIANA registration pending |
| Encoding | UTF-8 |
| Language version | 1.0 |
| Specification | 1.0.1 |
| Maintained by | Vegte Media Group |
| License | MIT (code), CC BY 4.0 (specification) |
Grammar
document = [header] members
header = "@vmgx" version newline
members = [member {sep member} [","]]
member = key ":" value
key = ident | "@" ident | string
value = object | list | string | text
| number | "true" | "false" | "null"
| date | datetime | link
object = "{" members "}"
list = "[" [value {sep value} [","]] "]"
sep = "," | newline
link = "<" non-space characters ">"
comment = "#" to end of line
Free to use, change and share
VMGX is open. Build it into your apps, sites and tools, including commercial ones, without asking permission.
The code
MIT License. Use, copy, change and share vmgx.js, vmgx.py and the conformance suite freely. Keep the copyright notice in copies of the code.
The specification
CC BY 4.0. Copy, translate and build on the rules of VMGX, crediting Vegte Media Group. Anyone may write their own VMGX parser.
The name
Say your software "supports VMGX" or is "VMGX-compatible" when it passes the conformance suite. Please don't suggest it is made or endorsed by Vegte Media Group.