Skip to content

S.T.J.JsonSerializer does not serialize value tuples #29045

@mazhou-msft

Description

@mazhou-msft

Using latest nightly build of .NET Core 3.0 and write:

string s = JsonSerializer.ToString((a: 1, b: 2));
Console.WriteLine(s);

You will get a string representing an empty object {}. I think the right behavior is to have { "Item1": 1, "Item2": 2 } and I expect it should also work for deserialization.

Metadata

Metadata

Assignees

Labels

area-System.Text.JsonenhancementProduct code improvement that does NOT require public API changes/additions

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions