Skip to content

Releases

0.2.0

Choose a tag to compare

@alftore alftore released this 12 Nov 11:06
v0.2.0
028c9bd

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), becomes anyOf of its cases and null. It used to accept any value. The serializer reads null as an unset union and writes one as null. 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 without JsonUnionTypeStructuralClassifier, fails with deserialization_failed.
  • docs/limits.md has a section on C# unions: where the schema promises more than the serializer reads.
  • New number types: BFloat16, Decimal32, Decimal64 and Decimal128 are numbers in typed schemas and with Z.Number<T>(). Like float, they state no range, and parsing refuses a value that overflows.
  • The source generator reports .NET 11 async validation, AsyncValidationAttribute and IAsyncValidatableObject, with ZORG0005, saying where it still runs. It doesn't turn it into RefineAsync, because such a check usually needs services and the finished object from its ValidationContext. The guide shows how to write the refinement with the service captured.
  • closed class hierarchies with InferClosedTypePolymorphism, IReadOnlySet<T>, extension data in an IReadOnlyDictionary or a JsonObject, 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

0.1.1

Choose a tag to compare

@alftore alftore released this 11 Nov 23:01
v0.1.1
ba8ed95
  • Fixed: Zorg.Json.AspNetCore.OpenApi failed on ASP.NET Core 11. With version 11 of Microsoft.AspNetCore.OpenApi, which uses Microsoft.OpenApi 3.x, building the OpenAPI document threw MissingMethodException. The package now has a build for .NET 10, against Microsoft.AspNetCore.OpenApi 10, and one for .NET 11, against version 11. On .NET 11, the OpenAPI 3.2 document that ASP.NET Core 11 writes by default gets the same schemas as a 3.1 document. On 0.1.0 the workaround is to keep Microsoft.AspNetCore.OpenApi at 10.0.x.
  • The other packages are unchanged. They target .NET 10, and the whole test suite also passes on the .NET 11 runtime.
  • The repository builds with the .NET 11 SDK.

Packages

Package
Zorg.Json Unchanged
Zorg.Json.AspNetCore Unchanged
Zorg.Json.AspNetCore.OpenApi Builds for .NET 10 (Microsoft.AspNetCore.OpenApi 10) and .NET 11 (11)
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.AspNetCore.OpenApi.0.1.1.nupkg --repo alftore/Zorg.Json

0.1.0

Choose a tag to compare

@alftore alftore released this 09 Nov 21:19
v0.1.0
4a0d26c

The first release outside preview. The library is the same as 0.1.0-preview.5. What's new is around it:

  • The repository is public. Issues are welcome through the issue forms. Pull requests are open to the maintainer only, as CONTRIBUTING.md explains.
  • docs/limits.md lists the known limits.
  • Packages are published from GitHub Actions with NuGet trusted publishing, and each release has a build provenance attestation. SECURITY.md says how to verify one.

Packages

Package
Zorg.Json Schemas, validation, JSON Schema emission and import, the source generator
Zorg.Json.AspNetCore Request validation with problem details, serving schemas
Zorg.Json.AspNetCore.OpenApi Schemas in the OpenAPI document
Zorg.Json.Llm OpenAI, Anthropic and Gemini structured output profiles
Zorg.Json.Extensions.AI Microsoft.Extensions.AI tools and typed structured responses

The packages attached here are the ones the Release run built and attested. Verify one with:

gh attestation verify Zorg.Json.0.1.0.nupkg --repo alftore/Zorg.Json

The full history of the previews is in the changelog.