Open Source Data Language

Mad Sam Notation

The most token-efficient structured data formatfor AI and modern applications.

MSN is a hierarchical data language that compiles directly to JSON. Up to 60% fewer tokens than JSON — designed for LLM workflows.

npm install @madsn/parser

See the Difference

MSN on the left, compiled JSON on the right.

config.msnMSN
# Server Configuration
- server
-- host: 0.0.0.0
-- port: 3000
-- ssl
--- enabled: true
--- cert: /path/to/cert.pem
- database
-- driver: postgres
-- host: db.example.com
-- port: 5432
-- credentials
--- username: admin
--- password: secret
- features
-- * auth
-- * api
-- * logging

283 characters

config.jsonJSON
{
  "server": {
    "host": "0.0.0.0",
    "port": 3000,
    "ssl": {
      "enabled": true,
      "cert": "/path/to/cert.pem"
    }
  },
  "database": {
    "driver": "postgres",
    "host": "db.example.com",
    "port": 5432,
    "credentials": {
      "username": "admin",
      "password": "secret"
    }
  },
  "features": [
    "auth",
    "api",
    "logging"
  ]
}

372 characters

Built for the Modern Stack

Everything you need to work with structured data, optimized for AI workflows.

Token Efficient

Up to 60% fewer tokens than JSON. Dramatically reduces costs in AI/LLM workflows.

🏗️

Unlimited Nesting

Use dash prefixes for any depth level. No brackets, no braces, just dashes.

🔧

Simple Parsing

Line-by-line parsing with zero ambiguity. Count dashes, read values, done.

🔄

JSON Compatible

Every MSN file compiles to valid JSON. Use MSN anywhere JSON is accepted.

📖

Open Source

MIT licensed with a full ecosystem: parser, CLI, validator, formatter, VS Code extension.

🎯

Type Inference

Numbers, booleans, and null are automatically detected. No explicit typing needed.

Token Efficiency

MSN consistently uses fewer characters than other formats. Fewer tokens means faster parsing, less bandwidth, and smaller prompts for AI models.

Simple Config

MSNsmallest
38
JSON
65
YAML
42
TOML
58
XML
124

Nested Objects

MSNsmallest
87
JSON
156
YAML
94
TOML
142
XML
298

Array Data

MSNsmallest
52
JSON
98
YAML
61
TOML
85
XML
187

Complex Config

MSNsmallest
214
JSON
418
YAML
248
TOML
396
XML
756

Character counts measured on equivalent configurations. Lower is better.

Ready to Simplify Your Config?

Start writing cleaner, more efficient configuration files today. MSN is open source, easy to learn, and ready for production.

Install in seconds

npm install -g @madsn/cli