RE:Dox is a high-performance, token-based structured data engine for .NET designed as a core component of CAPCOM's next-generation game-engine technology. It parses many wire formats (JSON/JSON5/CBOR/MessagePack/TOML/XML/HTML/CSV/INI/DOX) into a compact, fixed-size token DOM/IR that serves as a common structural layer for readers, writers, serializers, deserializers, and format converters. It combines tape-DOM parsing speed, node-DOM editability, and Newtonsoft-like flexibility (position-independent $type, $id/$ref, out-of-order constructor binding), while exposing a single format-agnostic DataReader/DataWriter abstraction, mutable token DOM APIs (DArray/DObject/DMap), trivia-preserving JSON5 editing, compatibility layers for System.Text.Json and Newtonsoft.Json, and an Apache-2.0 license.
Architecture centers on a 64-bit dual-mode token with an extension bit that distinguishes source-backed payloads from RE:Dox-owned editable payloads, enabling source-slice reuse and lazy decoding. Reading builds a random-access token DOM that enables pre-sizing, out-of-order constructor argument collection, $id/$ref cycle resolution, and automatic choice of sequential or parallel deserialization; writing uses a one-pass DataWriter path with fused bulk helpers. Benchmarks on an AMD Threadripper show up to ~1.8× faster sequential deserialization, ~2.8× faster parallel deserialization, and ~1.6× faster serialization versus System.Text.Json with significantly lower allocations (example: canada.json allocations ~2.56 MB vs ~8.53 MB). Benchmarks and reproduction commands are included.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.