Mad Sam Notation
The most token-efficient structured data format
for 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/parserSee the Difference
MSN on the left, compiled JSON on the right.
# 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
-- * logging283 characters
{
"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
Nested Objects
Array Data
Complex Config
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