using System.Collections.Generic;
using System.Text.Json.Serialization;
public static void Main()
var json = "{\"glossary\":{\"title\":\"example glossary\",\"GlossDiv\":{\"title\":\"S\",\"GlossList\":{\"GlossEntry\":{\"ID\":\"SGML\",\"SortAs\":\"SGML\",\"GlossTerm\":\"Standard Generalized Markup Language\",\"Acronym\":\"SGML\",\"Abbrev\":\"ISO 8879:1986\",\"GlossDef\":{\"para\":\"A meta-markup language, used to create markup languages such as DocBook.\",\"GlossSeeAlso\":[\"GML\", \"XML\"]},\"GlossSee\":\"markup\"}}}}}";
var serializedJson = JsonObject.Parse(json);
Console.WriteLine(serializedJson.Glossary.Title);
Console.WriteLine(serializedJson.ToString());
[JsonPropertyName("para")]
public string Parameter { get; set; }
public List<string> GlossSeeAlso { get; set; } = new List<string>();
public string ID { get; set; }
public string SortAs { get; set; }
public string GlossTerm { get; set; }
public string Acronym { get; set; }
public string Abbrev { get; set; }
public GlossDef GlossDef { get; set; }
public string GlossSee { get; set; }
public GlossEntry GlossEntry { get; set; }
[JsonPropertyName("title")]
public string Title { get; set; }
public GlossList GlossList { get; set; }
[JsonPropertyName("title")]
public string Title { get; set; }
public GlossDiv GlossDiv { get; set; }
[JsonPropertyName("glossary")]
public Glossary Glossary { get; set; }
public static JsonObject Parse(string json) => JsonSerializer.Deserialize<JsonObject>(json);
public override string ToString() => JsonSerializer.Serialize(this);