Repository navigation
For .NET 11. Zorg.Json now has a net11.0 build, which reads what System.Text.Json 11 added. Nothing changes on .NET 10.
- C# 15 unions: a property of a union type, such as
union Pet(Cat, Dog), becomesanyOfof its cases andnull. It used to accept any value. The serializer readsnullas an unset union and writes one asnull. Nothing inside a union is removed, at any depth, so the serializer's classifier sees the JSON as written and picks the same case as without Zorg. A union the serializer can't read, such as two object cases withoutJsonUnionTypeStructuralClassifier, fails withdeserialization_failed. - docs/limits.md has a section on C# unions: where the schema promises more than the serializer reads.
- New number types:
BFloat16,Decimal32,Decimal64andDecimal128are numbers in typed schemas and withZ.Number<T>(). Likefloat, they state no range, and parsing refuses a value that overflows. - The source generator reports .NET 11 async validation,
AsyncValidationAttributeandIAsyncValidatableObject, withZORG0005, saying where it still runs. It doesn't turn it intoRefineAsync, because such a check usually needs services and the finished object from itsValidationContext. The guide shows how to write the refinement with the service captured. closedclass hierarchies withInferClosedTypePolymorphism,IReadOnlySet<T>, extension data in anIReadOnlyDictionaryor aJsonObject, and[JsonNamingPolicy]on a member already worked through the contract. They're now covered by tests.
Packages
| Package | |
|---|---|
| Zorg.Json | Now built for .NET 10 and .NET 11. The .NET 11 build reads C# unions and the new number types |
| Zorg.Json.AspNetCore | Unchanged |
| Zorg.Json.AspNetCore.OpenApi | Unchanged since 0.1.1 |
| Zorg.Json.Llm | Unchanged |
| Zorg.Json.Extensions.AI | Unchanged |
The packages attached here are the ones the Release run built and attested. Verify one with:
gh attestation verify Zorg.Json.0.2.0.nupkg --repo alftore/Zorg.Json