The Token-Efficient Data Formats

Optimized for Large Language Models and High-Throughput Streams.
Type-safe, structure-aware, and 60% smaller than JSON.

Every Token Counts

JSON is verbose. SLD/MLD eliminates structural overhead like quotes, braces, and whitespace without losing data integrity.

JSON ~45 tokens
{
  "name": "Alice",
  "age": 30,
  "tags": ["admin", "user"],
  "verified": true
}
SLD/MLD ~18 tokens (-60%)
name[Alice;age[30;tags{admin~user};verified[^1

Core Documents & References

Authoritative specification, evolving RFC draft, quick references and source code. Use these links to implement, validate or extend the formats.

πŸ“œ RFC Draft

Work-in-progress formalization of SLD/MLD for future standardization and community review.

πŸ“˜ SLD Specification

Canonical single-line data rules: delimiters, header metadata, inline types, canonicalization profile.

πŸ—‚οΈ MLD Specification

Line-oriented variant optimized for grep/awk/sed, streaming ingestion and incremental processing.

πŸ§ͺ Examples & Guides

Real-world samples plus syntax guides to learn formatting choices and edge cases quickly.

πŸ’» Source & Issues

Reference implementations, open issue tracker, roadmap and contribution guidelines.

Looking for Spanish docs? Check Referencia RΓ‘pida SLD y MLD.

Interactive Translator (JSON ↔ SLD / MLD)

Convert between JSON and SLD/MLD directly in your browser. This demo supports core v2.0 features: fields, arrays, booleans (^1/^0), null (^_), and escapes. Advanced inline types and headers are omitted for simplicity.

JSON Input

SLD / MLD Input

Result

Ready.

Implementation Notes (click to expand)

The encoder walks object keys and emits key[value pairs separated by ;. Arrays produce key{item~item}. Booleans become ^1/^0; null becomes ^_. Special characters ; ~ [ { } ^ inside values are escaped with a caret.

The decoder splits on record separators (~ for SLD/MLD, \n for MLD), then fields by ; (ignoring empty tail). Each field is parsed as either property (name[Alice) or array (tags{admin~user}). Escapes are resolved by scanning values for caret-prefixed tokens.

This demo is intentionally minimalβ€”no canonicalization, inline type tags, headers, or nested objects. Treat it as an educational preview, not a production parser.

Key Features

πŸ“‰

Token Efficient

Uses rare characters (; [ {) as delimiters to minimize token splitting in LLM tokenizers.

⚑

Stream Ready

MLD (Multi Line Data) is the newline-separated variant. Perfect for logs, Unix pipes, and streaming APIs.

πŸ›‘οΈ

Type Safe

Native support for Strings, Numbers, Booleans (^1), Nulls (^_), and nested Arrays.

πŸš€

Zero Overhead

No quoting required for standard alphanumeric strings. Only escape what is necessary.

🧾

Header Metadata

Optional first record advertises version, schema, timestamp, source, and enabled features via reserved ! keys (e.g., !v, !schema, !ts, !source, !features{types~canon}).

🏷️

Inline Type Tags

Explicit typing on keys with !i !f !b !s !n !d !t !ts before [ or {, enabling schema validation and typed nulls (!n[).

Implementations

Production-ready libraries available for major languages.

JavaScript / TS

npm install sld-mld
Read Documentation →

Python

pip install sld-mld
Read Documentation →

Go

go get github.com/proteo5/sld
Read Documentation →

C# .NET

dotnet add package SLD
Read Documentation →

PHP

composer require proteo5/sld
Read Documentation →

Java

mvn dependency:get ...
Read Documentation →