Skip to content

.NET number values such as positive and negative infinity cannot be written as valid JSON. #48926

@rodion-m

Description

@rodion-m

In .NET 5 double.NaN is written to json as "NaN". Why not to write double.PositiveInfinity and double.NegativeInfinity as "PINF" and "NINF"? And the same for float.

It's not good that Infinity values throw an exception (.NET number values such as positive and negative infinity cannot be written as valid JSON.).

Metadata

Metadata

Assignees

Labels

area-System.Text.JsondocumentationDocumentation bug or enhancement, does not impact product or test codegood first issueIssue should be easy to implement, good for first-time contributorshelp wanted[up-for-grabs] Good issue for external contributors

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions