JsonParserParseJson(String) Method
Parse the given JSON.
Namespace: MichaelBrooks.UK.JsonAssembly: JsonDOM (in JsonDOM.dll) Version: 1.0.7
public static JsonNode ParseJson(
string jsonDocument
)
- jsonDocument String
- The JSON to be parsed.
JsonNodeA parse tree or document object model (DOM), populated with
JsonNode objects.
Sets the default reaction by the JsonNode.Item(String) operators so as to throw an exception
when attempting to retrieve the member of a JSON object by name when multiple members
have the same name.
Online page.
String businessDataFilePath = Directory.GetCurrentDirectory() + @"\Example1.json";
String json = File.ReadAllText(businessDataFilePath); // Throws FileNotFoundException if file does not exist
JsonNode jsonDOM = JsonParser.ParseJson(json);
| ArgumentException | Thrown if content of jsonDocument is not valid JSON. |