Parsing Json

Reading a JSON document is done using the static JsonParser class. Json can be parsed from a string or directly from a Stream.

Reading from a string

var jsonString = "{}";

JsonObject json  = JsonParser.Parse(jsonString);

Reading from a stream

using (var stream = File.OpenRead("test.json"))
{
   JsonObject json  = JsonParser.Parse(stream);
}