Format Comparison

How MSN stacks up against JSON, YAML, TOML, and XML.

FeatureMSNJSONYAMLTOMLXMLTON
Commentsyesnoyesyesyesyes
Unlimited Nestingyesyesyeshardyesyes
Token Efficientbestpoorgoodfairworstgood
Compiles to JSONyesnativeliblibliblib
Type Inferenceyesnoyesyesnoyes
Easy to Learnyesyesnofairnofair
Simple Specyesyesnofairnofair
No Brackets/Bracesyesnoyesnonono
MSN

Pros

  • +Fewest tokens/characters of any format
  • +Unlimited nesting via dash counting
  • +No brackets, braces, quotes, or commas needed
  • +Compiles directly to valid JSON
  • +Simple enough to parse with a few regex rules
  • +Comments supported

Cons

  • -New format — not yet widely adopted
  • -Tooling ecosystem still growing

Example

- server
-- host: localhost
-- port: 3000
-- features
--- * auth
--- * logging
JSON

Pros

  • +Universal support across languages
  • +Native in JavaScript/TypeScript
  • +Strict and unambiguous

Cons

  • -Very verbose — lots of quotes, braces, commas
  • -No comments
  • -No trailing commas
  • -Hard to read deeply nested objects

Example

{
  "server": {
    "host": "localhost",
    "port": 3000,
    "features": ["auth", "logging"]
  }
}
YAML

Pros

  • +Human-readable
  • +Widely used (Docker, K8s, CI/CD)
  • +Comments supported
  • +Rich type system

Cons

  • -Whitespace-sensitive — indentation errors crash parsers
  • -Implicit typing causes surprises (e.g. "no" → false)
  • -Complex spec — many edge cases
  • -Norway problem (NO → false)

Example

server:
  host: localhost
  port: 3000
  features:
    - auth
    - logging
TOML

Pros

  • +Clear and unambiguous syntax
  • +Popular in Rust/Go ecosystems
  • +Good for flat configs

Cons

  • -Deeply nested structures get very verbose
  • -Arrays of tables syntax is confusing
  • -Inline tables cannot span multiple lines
  • -Limited ecosystem outside Rust/Go

Example

[server]
host = "localhost"
port = 3000
features = ["auth", "logging"]
XML

Pros

  • +Very mature with rich tooling
  • +Supports attributes and namespaces
  • +Schema validation (XSD)

Cons

  • -Extremely verbose — opening and closing tags
  • -Hard to read for configuration
  • -Large file sizes
  • -Mostly replaced by JSON/YAML for configs

Example

<server>
  <host>localhost</host>
  <port>3000</port>
  <features>
    <item>auth</item>
    <item>logging</item>
  </features>
</server>
TON

Pros

  • +Compact object syntax with curly braces
  • +No quoting for simple string values
  • +Clean key = value pairs
  • +Supports nested blocks naturally

Cons

  • -Requires curly braces for nesting
  • -Less widely adopted than TOML/YAML
  • -Limited tooling ecosystem
  • -Array syntax still uses brackets
  • -Not as token-efficient as MSN

Example

server {
  host = localhost
  port = 3000
  features = [auth, logging]
}