.NET 8 serialización de Half, Int128 y UInt128
System.Text.Json en .NET 8 añade soporte integrado de serialización para los tipos numéricos Half, Int128 y UInt128.
System.Text.Json trae soporte de fábrica para tipos adicionales:
Veamos un ejemplo:
Console.WriteLine(JsonSerializer.Serialize(Half.MaxValue));
// Output: 65500
Console.WriteLine(JsonSerializer.Serialize(Int128.MaxValue));
// Output: 170141183460469231731687303715884105727
Console.WriteLine(JsonSerializer.Serialize(UInt128.MaxValue));
// Output: 340282366920938463463374607431768211455
Comments
Sign in with GitHub to comment. Reactions and replies thread back to the comments repo.