.Net JsonSerializer does not serialize tuple's values
JSON serializer returns an empty JSON object.
using System.Text.Json;
(int, int) tuple1 = (1, 2);
var token = JsonSerializer.Serialize(tuple1); // return empty object {}
(int item1, int item2) tuple2 = (1, 2);
token = JsonSerializer.Serialize(tuple2); // return empty object {}
(int item1, int item2) tuple3 = (item1:1, item2:2);
token = JsonSerializer.Serialize(tuple3); // return empty object {}
it can be passed by many workarounds
I'm trying to understand why or what prevents the serializer to understands the tuples
is it related to the tuples' structure