RON2 - Rusty Object Notation parser with full AST access
This crate provides a standalone RON parser with three APIs:
- AST API: Full fidelity parsing with perfect round-trip support
- Value API: Simplified access to semantic content only
- Typed Conversions: [
FromRon] and [ToRon] traits for Rust types
No serde dependency required.
AST Example (full fidelity)
use ;
let source = "// config\nPoint(x: 1, y: 2)";
let doc = parse_document.unwrap;
let output = serialize_document.unwrap;
assert_eq!; // Perfect round-trip
Value Example (semantic only)
use Value;
let value: Value = "[1, 2, 3]".parse.unwrap;
assert!;
Typed Conversions
use ;
let numbers: = Vecfrom_ron.unwrap;
assert_eq!;
let ron_string = numbers.to_ron.unwrap;