Skip to content

RSON-Rust-Serialized-Object-Notation/RSON-Core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦€ RSON - The Evolution of JSON

Rust Serialized Object Notation - A human-readable data format with rich types, comments, and JSON compatibility

Stars Crates.io NPM PyPI License


🎯 What is RSON?

RSON (Rust Serialized Object Notation) is a next-generation data serialization format designed to replace JSON with modern features while maintaining full backward compatibility.

πŸ”₯ Key Features

  • πŸ’¬ 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

⚑ Quick Start

Try Online

🌐 rson.org/playground - Start experimenting immediately!

JSON vs RSON

JSON (Before) RSON (After)
{
  "name": "My App", 
  "version": "1.0.0",
  "database": {
    "host": "localhost",
    "port": 5432
  },
  "features": ["auth", "logging"]
}
// Application configuration
AppConfig(
  name: "My App",
  version: "1.0.0",
  database: DatabaseConfig(
    host: "localhost",
    port: Some(5432), // Optional!
  ),
  features: ["auth", "logging"], // Trailing comma OK!
  environment: Environment::Production, // Rich enum!
)

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 Support

πŸ“¦ Install Libraries

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

πŸ’» Quick Examples

Rust

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)),
    )
"#)?;

JavaScript/Node.js

import RSON from 'rson-js';

const config = RSON.parse(`
  AppConfig(
    name: "My App",
    features: ["auth", "logging"], // Comments work!
  )
`);

console.log(config.name); // "My App"

Python

import rson

config = rson.loads("""
  # Python-style comments too!
  AppConfig(
    name: "My App", 
    debug: true,
  )
""")

print(config.name)  # "My App"

πŸ› οΈ Developer Tools

🎨 Editor Support

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

βš™οΈ Command Line Tools

# 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

🌐 Web Playground

Visit rson.org/playground to:

  • Try RSON syntax interactively
  • Convert between JSON and RSON
  • Validate RSON files online
  • Share RSON snippets

πŸ“Š Performance

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

🌍 Project Structure

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

🎯 Roadmap to Global Adoption

βœ… Phase 1: Core Foundation (Completed)

  • RSON specification v1.0
  • Rust reference implementation
  • CLI tools and VSCode extension
  • WebAssembly parser for browsers

🚧 Phase 2: Language Libraries (In Progress)

  • JavaScript/TypeScript (rson-js)
  • Python (rson-python)
  • Go library
  • Java library
  • C++ library
  • C# library

πŸ“‹ Phase 3: Ecosystem Integration (Planned)

  • Framework plugins (Express, Django, Spring Boot)
  • Database support (PostgreSQL, MongoDB)
  • CI/CD integration (GitHub Actions, Jenkins)
  • Cloud platform support (AWS, GCP, Azure)

πŸŽ–οΈ Phase 4: Standardization (2025-2025)

  • IETF RFC submission
  • Browser native support proposal
  • Industry adoption by major projects
  • Conference presentations and advocacy

πŸ“ˆ Success Metrics

🎯 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 πŸ“œ

🀝 Community & Contributing

🌟 Join the Movement

πŸ”§ How to Contribute

  1. Language Libraries - Help build RSON support for more languages
  2. Documentation - Write guides, tutorials, and examples
  3. Tools & Integrations - IDE plugins, framework support
  4. Testing & Feedback - Try RSON in real projects
  5. Evangelism - Blog posts, talks, social media

πŸ“– Read our Contributing Guide β†’

πŸ’Ό Early Adopters & Sponsors

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]


πŸ“š Documentation

πŸ“– Quick Links

πŸŽ“ Learning Resources


πŸ›‘οΈ Security & Stability

πŸ”’ Security First

  • 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

πŸ“‹ Stability Promise

  • Semantic versioning - Predictable compatibility
  • Comprehensive tests - 100% test coverage goal
  • Backward compatibility - JSON support maintained
  • Long-term support - Committed to stability

πŸ“„ License

MIT License - Open source and free for commercial use.

See LICENSE file for full details.


πŸŽ‰ Recognition

πŸ… Core Team

πŸ™ Special Thanks

  • 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

πŸš€ Ready to Start?

  1. 🌐 Try the Playground - Experiment with RSON online
  2. πŸ“– Read the Docs - Learn RSON syntax and features
  3. πŸ’» Install Tools - Get started with your language
  4. 🀝 Join Community - Connect with other developers
  5. ⭐ 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! ⭐

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published