Repository navigation
Release v22.37.0
Added
ArcOptions.AddJsonTypeInfoResolver(...)adds an application's source-generatedJsonSerializerContext(or anyIJsonTypeInfoResolver) ahead of Arc's own metadata, for trimmed and NativeAOT applications. NativeAOT applications register their query data, change-set item andCommandResult<TResponse>types there (Refs #2854)
Changed
- Arc's JSON options carry a type-info resolver chain: resolvers the application added, then one Arc resolver that asks any resolvers appended to the chain later, then a source-generated context for Arc's own wire types (query and command results, change sets, paging, observable query hub and WebSocket messages, identity, introspection), then reflection only when it is enabled. Arc serializes these types through resolved
JsonTypeInfoinstead of runtime-type overloads. The JSON on the wire is byte-for-byte unchanged, and resolvers an application appends toTypeInfoResolverChainkeep deciding the contracts as before. The trim/AOT baseline drops from 488 to 332 (Refs #2854) ArcOptions.JsonSerializerOptions.TypeInfoResolveris no longernullby default, and an appended resolver that does not know one of Arc's types now falls back to Arc's metadata instead of failing. An application that appendsJsonTypeInfoResolver.Combine(options.TypeInfoResolver, x)to the chain now has Arc's resolver answer beforexfor types Arc or reflection knows; wrapping withWithAddedModifierand plain appends behave as before (Refs #2854)
Reviewed with Anthropic models only (no cross-provider review available right now).