Specification

VMGX Specification

Language version 1.0 · Specification 1.0.1 · November 2026

Published by Vegte Media Group. This specification is licensed under CC BY 4.0.

VMGX (Vegte Media Group Extended) is a lightweight, human-readable data format for structured records, rich metadata and long-term digital preservation. It keeps JSON's simplicity and adds what archives and publishers need: comments, real dates, links, multi-line text and metadata on any record.

The key words "must", "must not", "should" and "may" are used as in RFC 2119.

1. Example

@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.
    """

editions: [
  { format: "paperback", year: 2027 }
  { format: "ebook", year: 2027 }
]

2. Files

3. Header and versions

The first non-empty, non-comment line may be a header: @vmgx followed by the language version as major.minor.

@vmgx 1.0

4. Documents and entries

A document is an object whose outer braces are left out: the file itself is the object.

Each entry is written as key: value. Entries are separated by a line break or a comma. Commas between lines are optional, and a trailing comma before a closing bracket is allowed. A value must start on the same line as its key; objects and lists may then span several lines. Objects and lists may be nested up to 256 levels deep.

name: "Vegte Media Group"
founded: 2026, active: true

5. Keys

6. Values

Type Written as Example
Text double quotes "Lisbon"
Text block triple quotes """…"""
Integer digits, optional minus 248, -3
Decimal digits with . or an exponent 19.95, 1.5e3
Boolean true, false true
Null null null
Date YYYY-MM-DD 2027-03-01
Date-time ISO 8601 with time 2026-11-14T22:30:00+01:00
Link angle brackets <https://example.com>
Object curly braces { city: "Lisbon" }
List square brackets [1, 2, 3]

Text is always in quotes. name: Alex is an error; write name: "Alex".

Numbers follow JSON: no leading zeros, no leading +, no trailing ., and no NaN or infinity. A number too large to store, such as 1e999, is an error.

7. Text and text blocks

Quoted text stays on one line. It supports these escapes:

Escape Meaning
\" \\ \/ quote, backslash, slash
\n \t \r \b \f line feed, tab, carriage return, backspace, form feed
\uXXXX a UTF-16 code unit as four hex digits; surrogate pairs are joined
\u{1F600} any Unicode code point, one to six hex digits

Text blocks hold text over several lines without escapes:

bio: """
    First line.
    Second line, with "quotes" and no escaping.
    """

8. Dates and times

A link is a URL or URI in angle brackets, such as <https://example.com/book>, <mailto:info@example.com> or <urn:isbn:9780000000000>. Spaces just inside the brackets are ignored. A link must not be empty or contain spaces.

# starts a comment that runs to the end of the line, on its own line or after a value. A # inside quoted text or a text block is part of the text.

10. Metadata

A key that starts with @ is metadata: information about the object it sits in, not part of its content. Metadata at the top of a file describes the whole document.

Key Meaning
@id Unique identifier of the record
@type Kind of record, such as "publication"
@created When the record was created (date-time)
@modified When it last changed (date-time)
@author Who created or is responsible for it
@source Where the material came from (provenance)
@license Usage rights, such as "CC BY 4.0"
@lang Language code, such as "en"
@version Version of the record

11. Converting to and from JSON

VMGX converts to JSON in two modes. Comments are not carried into JSON in either mode.

Mode Dates, date-times and links become Round trip back to VMGX
Plain JSON (data-preserving) Strings, such as "2027-03-01" Values survive; dates and links return as text
Typed JSON (type-preserving) {"@date": "…"}, {"@datetime": "…"}, {"@link": "…"} Values and types survive

12. Errors

A parser must reject the whole file when it finds any of the following, and should report the line and column:

13. Grammar

document  = [header] members
header    = "@vmgx" 1*WSP major "." minor
members   = [member *(sep member) [","]]
member    = key ":" value
key       = ident / "@" ident / string
ident     = (ALPHA / "_") *(ALPHA / DIGIT / "_" / "-")
value     = object / list / string / text / number / date / datetime
          / link / "true" / "false" / "null"
object    = "{" members "}"
list      = "[" [value *(sep value) [","]] "]"
sep       = "," / newline
string    = DQUOTE *(char / escape) DQUOTE
text      = 3DQUOTE *any-except-3DQUOTE 3DQUOTE
link      = "<" 1*non-space ">"
comment   = "#" *any-except-newline

Whitespace (spaces and tabs) and comments may appear between any two tokens. Line breaks may appear wherever a separator is allowed, and after {, [ and before }, ].

14. Conformance

A parser conforms to VMGX 1.0 when it passes every case in the conformance suite:

The suite has 16 valid and 42 invalid cases. It is published with the reference parsers at https://codeberg.org/vmgx/vmgx. The reference parsers vmgx.js and vmgx.py pass all of them.

15. Security

16. License and name

This specification is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0). The reference code is under the MIT License. Software may say it "reads VMGX", "supports VMGX" or is "VMGX-compatible" when it passes the conformance suite, but must not suggest it is made or endorsed by Vegte Media Group.

Changes