Rust Serialized Object Notation - A human-readable data format with rich types, comments, and JSON compatibility
RSON (Rust Serialized Object Notation) is a next-generation data serialization format designed to replace JSON with modern features while maintaining full backward compatibility.
- π¬ Comments & Documentation - Finally annotate your configs!
- π¨ Rich Type System - Structs, enums, optionals, tuples
- π οΈ Developer-Friendly - Trailing commas, cleaner syntax
- β‘ High Performance - Faster parsing + optional binary mode
- π JSON Compatible - Every JSON file is valid RSON
- π Universal Support - Libraries for all major languages
π rson.org/playground - Start experimenting immediately!
JSON (Before) | RSON (After) |
---|---|
{
"name": "My App",
"version": "1.0.0",
"database": {
"host": "localhost",
"port": 5432
},
"features": ["auth", "logging"]
} |
|
RSON provides everything JSON lacks:
- β Comments for documentation
- β Rich types (structs, enums, options)
- β Trailing commas (no more diff noise!)
- β Cleaner syntax, fewer quotes
- β Still 100% JSON compatible
Language | Package | Install Command | Status |
---|---|---|---|
Rust | serde_rson |
cargo add serde_rson |
β Stable |
JavaScript | rson-js |
npm install rson-js |
π§ Beta |
Python | rson |
pip install rson |
π§ Beta |
Go | go-rson |
go get github.com/rson/go-rson |
π Planned |
Java | rson-java |
implementation 'org.rson:rson-java' |
π Planned |
C++ | rson-cpp |
vcpkg install rson-cpp |
π Planned |
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
struct Config {
name: String,
database: DatabaseConfig,
}
let config: Config = serde_rson::from_str(r#"
Config(
name: "My App",
database: DatabaseConfig(host: "localhost", port: Some(5432)),
)
"#)?;
import RSON from 'rson-js';
const config = RSON.parse(`
AppConfig(
name: "My App",
features: ["auth", "logging"], // Comments work!
)
`);
console.log(config.name); // "My App"
import rson
config = rson.loads("""
# Python-style comments too!
AppConfig(
name: "My App",
debug: true,
)
""")
print(config.name) # "My App"
Editor | Extension | Features |
---|---|---|
VSCode | RSON Language Support | Syntax highlighting, formatting, validation |
JetBrains | RSON Plugin | IntelliJ, WebStorm, PyCharm support |
Vim/Neovim | vim-rson |
Syntax highlighting, indentation |
Emacs | rson-mode |
Major mode for RSON |
# Install RSON CLI tools
cargo install rsonc
# Convert JSON to RSON
rsonc convert input.json --to-rson > output.rson
# Validate RSON files
rsonc validate config.rson
# Format RSON (like rustfmt)
rsonc format --inplace *.rson
# Convert between text and binary
rsonc convert config.rson --to-binary > config.rsonb
Visit rson.org/playground to:
- Try RSON syntax interactively
- Convert between JSON and RSON
- Validate RSON files online
- Share RSON snippets
RSON is designed to be faster than JSON in many scenarios:
Metric | JSON | RSON Text | RSON Binary |
---|---|---|---|
Parse Speed | Baseline | ~90% | ~300% |
File Size | Baseline | ~95% | ~60% |
Memory Usage | Baseline | ~100% | ~70% |
Benchmarks on typical configuration files. Results may vary.
π Performance Benefits:
- Text Mode: Comparable to JSON with richer type information
- Binary Mode: 3x faster parsing, 40% smaller files
- Streaming: Built-in support for large data processing
- Memory Efficient: Minimal allocation overhead
This repository contains the complete RSON ecosystem:
RSON/
βββ π¦ rson-core/ # Core Rust parser/serializer
βββ π¦ serde_rson/ # Serde integration for Rust
βββ βοΈ rson-cli/ # Command-line tools (rsonc)
βββ π rson-js/ # JavaScript/TypeScript library
βββ π rson-python/ # Python library
βββ π± rson-wasm/ # WebAssembly bindings
βββ π rson-schema/ # Schema validation
βββ π¨ vscode-extension/ # VSCode language support
βββ π website/ # rson.org website & docs
βββ π system-integration/ # OS-level integration
- RSON specification v1.0
- Rust reference implementation
- CLI tools and VSCode extension
- WebAssembly parser for browsers
- JavaScript/TypeScript (rson-js)
- Python (rson-python)
- Go library
- Java library
- C++ library
- C# library
- Framework plugins (Express, Django, Spring Boot)
- Database support (PostgreSQL, MongoDB)
- CI/CD integration (GitHub Actions, Jenkins)
- Cloud platform support (AWS, GCP, Azure)
- IETF RFC submission
- Browser native support proposal
- Industry adoption by major projects
- Conference presentations and advocacy
π― 6-Month Goals:
- 1,000+ GitHub stars β
- JavaScript library on NPM π¦
- Python library on PyPI π
- 10+ production projects using RSON π’
- Official website with playground π
π 1-Year Vision:
- 10,000+ developers using RSON globally π₯
- Native browser support (RSON.parse()) π
- Database integration (RSON columns) ποΈ
- IETF RFC for standardization π
- β Star this repository to show support
- π¬ Join our Discord for real-time collaboration
- π¦ Follow @rson_format for updates
- π± Join r/rson for discussions
- Language Libraries - Help build RSON support for more languages
- Documentation - Write guides, tutorials, and examples
- Tools & Integrations - IDE plugins, framework support
- Testing & Feedback - Try RSON in real projects
- Evangelism - Blog posts, talks, social media
π Read our Contributing Guide β
Interested in early access or sponsoring RSON development?
- π’ Enterprise Support - Priority features and consulting
- π― Custom Integrations - Tailored solutions for your stack
- π Technical Advisory - Influence RSON's roadmap
Contact: [email protected]
- Getting Started Guide - Learn RSON in 5 minutes
- RSON Specification - Complete syntax reference
- API Documentation - Language-specific guides
- Migration Guide - JSON β RSON migration
- Examples - Real-world RSON files
- Interactive Playground - Try RSON online
- Video Tutorials - Step-by-step guides
- Blog Posts - Deep dives and use cases
- Conference Talks - Presentations and demos
- No code execution - RSON is purely declarative data
- Safe parsing - Protection against malicious input
- Memory safety - Built on Rust's safety guarantees
- Audit ready - Open source with transparent development
- Semantic versioning - Predictable compatibility
- Comprehensive tests - 100% test coverage goal
- Backward compatibility - JSON support maintained
- Long-term support - Committed to stability
MIT License - Open source and free for commercial use.
See LICENSE file for full details.
- Dedan Okware - Creator & Lead Maintainer
- Contributors Welcome! - Join the team β
- Rust Community - For the inspiration and foundation
- JSON - For proving that simple formats can change the world
- Early Adopters - For believing in RSON's vision
- π Try the Playground - Experiment with RSON online
- π Read the Docs - Learn RSON syntax and features
- π» Install Tools - Get started with your language
- π€ Join Community - Connect with other developers
- β Star the Repo - Show your support!
π¦ Built with Rust β’ π Made for Everyone β’ β¨ The Future of Data
Website β’ Documentation β’ Community β’ Contributing
Together, we're making RSON the global standard for data serialization.
β Star us on GitHub to support the mission! β