Repository navigation
Object Serialization is here!
New Features
Compile-Time Reflection Serialization
- Added
Json.Serialize<T>()andJson.Deserialize<T>()methods using comptime reflection - Support for nested objects, collections, enums, and custom attributes
- New attributes:
[JsonConverter],[JsonNumberHandling],[JsonInclude]
Pretty-Print for Comptime Serializers
IJsonSerializablenow supportsJsonWriterOptionsfor indented output- New
Json.Serialize<T>(T value, Stream stream, JsonWriterOptions options)overloads
Custom Converter Support
- Added
IJsonConverterinterface for custom type serialization - Use
[JsonConverter(typeof(MyConverter))]attribute
Inheritance Support
- Serialization/deserialization now handles inherited fields
- Enum number handling via
[JsonNumberHandling]attribute
Small String Optimization (SSO)
- Strings <=14 characters now use stack allocation, reducing heap pressure
Improved Safe Access
- Generic
GetOrDefault<T>()overloads to avoid allocation for primitive defaults
Bug Fixes
- Fixed memory leak in
Json.Deserialize<T>() - Fixed null termination in
dtoafunction - Removed unused
GetTypeName()method from JsonPointer
Improvements
- Improved comment parsing error message:
"// or /* to start comment" - New
TestReleasebuild configuration with optimized flags - Updated examples and documentation
Full Changelog: v1.1.0...v1.2.0