public static async Task <ISourceNode> ParseAsync(string json, string rootName = null, FhirJsonParsingSettings settings = null) { if (json == null) { throw Error.ArgumentNull(nameof(json)); } using (var reader = SerializationUtil.JsonReaderFromJsonText(json)) { return(await ReadAsync(reader, rootName, settings).ConfigureAwait(false)); } }
public static ISourceNode Create(JObject root, string rootName = null, FhirJsonParsingSettings settings = null) => new FhirJsonNode(root, rootName, settings);
public static async Task <ISourceNode> ReadAsync(JsonReader reader, string rootName = null, FhirJsonParsingSettings settings = null) { if (reader == null) { throw Error.ArgumentNull(nameof(reader)); } var doc = await SerializationUtil.JObjectFromReaderAsync(reader).ConfigureAwait(false); return(new FhirJsonNode(doc, rootName, settings)); }