CAPCOM-TD-OSS/REDox
High-performance, token-based structured data engine for .NET. A core component of REX, the technology behind CAPCOM's next-generation game engine.
What it solves
RE:Dox is a high-performance structured data engine for .NET that addresses the trade-offs between speed, memory usage, and editability. It provides a unified way to parse, edit, and serialize various data formats (JSON, CBOR, MessagePack, etc.) by converting them into a compact, shared token-based intermediate representation.
How it works
Instead of creating a heavy object tree, RE:Dox parses input into a fixed-size 64-bit token array. This structure acts as both a compact document model and a common layer for serializers. Because the structure is fully addressable, the engine can perform advanced operations like automatic parallel deserialization, out-of-order constructor binding, and lazy decoding of values. It uses different paths for reading and writing to optimize performance: writing streams data directly to a buffer, while reading builds the token DOM to enable random access and efficient manipulation.
Who it’s for
This project is designed for .NET developers working on performance-critical applications, such as game engines or systems handling large, complex data payloads, who need faster serialization speeds and lower memory allocation than standard libraries provide.
Highlights
- High Performance: Offers significantly faster serialization and deserialization compared to System.Text.Json, with reduced memory allocation.
- Parallel Processing: Automatically detects large arrays and deserializes elements in parallel to maximize CPU utilization.
- Unified API: Uses a single converter model across multiple formats, including JSON, CBOR, MessagePack, and INI.
- Mutable Token DOM: Allows for in-place editing (insert, remove, replace) of structured data without rebuilding the entire document.
- Trivia Preservation: Supports editing JSON5 while preserving comments and whitespace.
- Compatibility: Includes layers for existing serializers like Newtonsoft.Json and System.Text.Json.
Related
- Project
- Project
- Project
- Project
- Project