C# 14 · Async, errors and resources
Serialize to and from JSON
Convert objects to JSON text and back with System.Text.Json.
var json = JsonSerializer.Serialize(person);
var again = JsonSerializer.Deserialize<Person>(json);
C# 14 · Async, errors and resources
Convert objects to JSON text and back with System.Text.Json.
var json = JsonSerializer.Serialize(person);
var again = JsonSerializer.Deserialize<Person>(json);
Was this page helpful?