You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 29ca564
Browse filesBrowse the repository at this point in the historyBrowse files
Serialize enum as string: retarget net10.0, ConfigureHttpJsonOptions, DataContractJsonSerializer and source-generation samples
Retarget all seven projects from net6.0 to net10.0 and refresh packages
against NuGet: Newtonsoft.Json 13.0.4, Microsoft.AspNetCore.Mvc.NewtonsoftJson
10.0.11, Microsoft.AspNetCore.Mvc.Testing 10.0.11, Microsoft.NET.Test.Sdk
18.9.0, xunit 2.9.3, xunit.runner.visualstudio 3.1.5 (the v2-compatible line),
coverlet.collector 10.0.1. The System.Text.Json package references are dropped
because the library is in-box on net10.0.
Minimal API sample now uses ConfigureHttpJsonOptions instead of
Configure<JsonOptions>; both are the same Microsoft.AspNetCore.Http.Json.JsonOptions
object, and the extension is the first-class way to reach it. Dead
app.UseAuthorization() removed from both Web API samples: neither registers
authentication or authorization.
New coverage:
- JsonStringEnumMemberName, both with a registered JsonStringEnumConverter
(custom string) and without one (still a number).
- DataContractJsonSerializer: enums are always written as numbers,
EnumMember is ignored, reading the string form back throws, an undefined
number is accepted, and the XML DataContractSerializer does honour
EnumMember on the same type.
- Source-generated serialization through a JsonSerializerContext with
UseStringEnumConverter set.
Build clean with 0 warnings, 27 tests passing on SDK 10.0.302.
0 commit comments