VMGX

Vegte Media Group Extended

A lightweight, human-readable data format for structured records, rich metadata and long-term digital preservation.

Verba volant, scripta manent.
record.vmgx
@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.
    """
Why VMGX

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.

I

Readable first

No outer braces, no quotes around keys, commas optional between lines. A person can read and edit a file without tools.

II

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.

III

Links as links

Write <https://…> and tools know it is a web address, ready to check or to show as a hyperlink.

IV

Metadata built in

Keys that start with @, such as @id, @source and @license, describe the record they sit in.

V

Comments and long text

Annotate with #. Write summaries, captions and bios over several lines in """ text blocks.

VI

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.

Syntax guide

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.0 is 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

TypeExample
Text"Lisbon"
Text block"""…"""
Integer248, -3
Decimal19.95, 1.5e3
Booleantrue, false
Nullnull
Date2027-03-01
Date-time2026-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 as 2026-02-30 are rejected.
  • Date-times follow ISO 8601, with optional seconds and a time zone: Z or 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.

KeyMeaning
@idUnique identifier
@typeKind of record
@createdWhen it was created
@modifiedWhen it last changed
@authorWho is responsible for it
@sourceWhere it came from (provenance)
@licenseUsage rights
@langLanguage code
@versionVersion 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.
  • @created and @modified should be date-times with a time zone.
  • @vmgx is 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
Precise rules

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.

ModeDates and links becomeRound trip
Plain JSON
data-preserving
Ordinary stringsValues 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 @vmgx used 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.

vmgx-conformance.zipTest files, expected results and test runners
↓
Playground

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.

Input · VMGX
Result · JSON

        
Ready
Compared

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.

FeatureJSONYAMLTOMLXMLVMGX
CommentsNoYesYesYesYes
Text always quoted, so no type guessingYesNo, unquoted words can turn into booleans or numbersYesEverything is textYes
Indentation mattersNoYesNoNoNo
Multi-line textEscapes onlyYesYesYesYes
Native datesNoDepends on the parserYesWith a schemaYes
Native linksNoNoNoWith a schemaYes
Metadata on recordsNo conventionNo conventionNo conventionAttributes@ keys
Deeply nested recordsEasyEasyAwkwardEasyEasy
Best suited forData exchangeConfigurationConfigurationStructured documentsRecords and archives
EcosystemUniversalLargeGrowingMatureNew
Get started

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

VMGX EditorOpen, edit, check and save .vmgx files in your browser
→
Source codeAll code, the specification and issue tracker on Codeberg
→
SpecificationThe complete rules of VMGX 1.0, version 1.0.1
→
VS Code extensionInstall VMGX for Visual Studio Code from the Marketplace
→
vmgx-vscode.vsixThe same extension as a file, for offline installs
↓
vmgx.jsJavaScript parser for browsers and Node.js
↓
vmgx.pyPython parser and command-line tools
↓
example.vmgxA complete publication record to learn from
↓
vmgx-conformance.zipThe conformance suite: 58 test cases
↓

File details

Extension.vmgx
Media typeapplication/vnd.vmg.vmgx
IANA registration pending
EncodingUTF-8
Language version1.0
Specification1.0.1
Maintained byVegte Media Group
LicenseMIT (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
License

Free to use, change and share


VMGX is open. Build it into your apps, sites and tools, including commercial ones, without asking permission.

I

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.

II

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.

III

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.

Read the full license text

11value types
0dependencies
2reference parsers
58conformance tests passed