using System.Text.Json.Serialization;
using System.Collections.Generic;
public static void Main()
""Description"": ""Total Calculated things"",
""2018"": ""5,820,456 "",
var myObj = JsonSerializer.Deserialize<SomeType>(json);
var result = new WrapperType
Value = new ProperlyFormattedType()
foreach (var pair in myObj.Value)
if (pair.Key == "Description")
result.Value.Description = pair.Value;
else if (int.TryParse(pair.Key, out int _))
Console.WriteLine(JsonSerializer.Serialize(result));
[JsonPropertyName("value")]
public Dictionary<string, string> Value { get; set; }
public ProperlyFormattedType Value { get; set; }
public class ProperlyFormattedType
public string Description { get; set; }
public List<DatedValues> YearData { get; set; } = new List<DatedValues>();
public string Year { get; set; }
public string Data { get; set; }