Write data like notes, parse like lightning. A simple, compact, model-optimized data format.
- 40-70% smaller than JSON
- Write like taking notes - minimal syntax
- Optimized for AI/ML - token efficient
- Fast parsing - single-pass parser
- Bidirectional - parse and serialize
# Install from GitHub
npm install github:Dysporium/note-data-format
# Or clone and link locally
git clone https://github.com/Dysporium/note-data-format.git
cd note-data-format/notedf-ts
npm install && npm run build
npm linkimport { NoteDataFormat } from '@dysporium/notedf';
const parser = new NoteDataFormat();
// Parse NDF
const data = parser.parse(`
user:
name: Alice
age: 30
tags: python ai ml
`);
// Serialize to NDF
const ndfText = parser.dumps(data);name: John Doe age: 30 active: yes score: 95.5
tags: python ai machine-learning colors: red, blue, green
user: name: Alice settings: theme: dark notifications: yes
description: | This is a multi-line description. It preserves line breaks.
| Feature | JSON | YAML | TOML | NDF |
|---|---|---|---|---|
| Write Speed | ⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Parse Speed | ⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Size | ⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Token Efficiency | ⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
- Formal Grammar - Complete EBNF grammar specification
- Canonicalization Rules - Rules for deterministic serialization
- Escaping & Edge Cases - How to handle special characters and edge cases
Full documentation available in the GitHub Wiki
MIT License - see LICENSE file for details.