Skip to content

Migrate away from deprecated Newtonsoft JSON serializer #1149

@johnthagen

Description

@johnthagen

When we upgraded to .NET Core 3.x (#324), the app failed to work under the new default JSON serializer included with ASP .NET Core (System.Text.JSON). This was likely due to actual bugs in how the frontend was sending data.

<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.10" />

// NewtonsoftJson needed when porting from .NET Core 2.2 to 3.0
// https://dev.to/wattengard/why-your-posted-models-may-stop-working-after-upgrading-to-asp-net-core-3-1-4ekp
// TODO: This may be able to be removed by reviewing the raw JSON from the frontend to see if there
// is malformed data, such as an integer sent as a string ("10"). .NET Core 3.0's JSON parser
// no longer automatically tries to coerce these values.
.AddNewtonsoftJson();

This should be removed and we should migrate back to the default JSON serializer.

Metadata

Metadata

Assignees

Labels

backendmaintenanceIssue that makes it difficult to maintain the software or to upgrade installations post-release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions