Skip to content

System.Text.Json support for Int128 and UInt128 #73500

@DamianEdwards

Description

@DamianEdwards

The JSON specification doesn't support integers larger than 64-bits as far as I can tell, which makes sense given it's JavaScript-based origins. This leaves the question of how to represent larger numbers somewhat open today, leading to different approaches in the wild for dealing with such numbers, e.g. encode as string, ignore spec and use customized JSON parser, etc.

What do we expect folks to do in the case of System.Text.Json, and by extension, ASP.NET Core (dotnet/aspnetcore#43119)? Create and use a custom JsonConverter<Int128>? Would we consider including a default converter in the runtime, and if so, what would it be?

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions