1using System.Text.Json;
2
3//Serialize
4var jsonString = JsonSerializer.Serialize(yourObject);
5
6// Deserialize
7var obj = JsonSerializer.Deserialize<YourObject>(stringValue);
1weatherForecast = JsonSerializer.Deserialize<WeatherForecastWithPOCOs>(jsonString);
2