Skip to content

Release v22.37.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 19:50
206a031

Added

  • ArcOptions.AddJsonTypeInfoResolver(...) adds an application's source-generated JsonSerializerContext (or any IJsonTypeInfoResolver) ahead of Arc's own metadata, for trimmed and NativeAOT applications. NativeAOT applications register their query data, change-set item and CommandResult<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 JsonTypeInfo instead of runtime-type overloads. The JSON on the wire is byte-for-byte unchanged, and resolvers an application appends to TypeInfoResolverChain keep deciding the contracts as before. The trim/AOT baseline drops from 488 to 332 (Refs #2854)
  • ArcOptions.JsonSerializerOptions.TypeInfoResolver is no longer null by 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 appends JsonTypeInfoResolver.Combine(options.TypeInfoResolver, x) to the chain now has Arc's resolver answer before x for types Arc or reflection knows; wrapping with WithAddedModifier and plain appends behave as before (Refs #2854)

Reviewed with Anthropic models only (no cross-provider review available right now).