Format Comparison

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

FeatureMSNJSONYAMLTOMLXML
Commentsyesnoyesyesyes
Unlimited Nestingyesyesyeshardyes
Token Efficientbestpoorgoodfairworst
Compiles to JSONyesnativelibliblib
Type Inferenceyesnoyesyesno
Easy to Learnyesyesnofairno
Simple Specyesyesnofairno
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>