Skip to content

Could not serialize nested ConcurrentDictionary to json #670

@Executor-Cheng

Description

@Executor-Cheng

The following code works in .NET Core 3.0.
In .NET Core 3.1, it will throw System.NotSupportedException.

string input = "{\"x\":{\"y\":\"z\"}}";
var test = JsonSerializer.Deserialize<ConcurrentDictionary<string, ConcurrentDictionary<string, string>>>(input); // ok
string output = JsonSerializer.Serialize(test); // throws

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions