Exemplo n.º 1
0
 public static IElementNavigator Create(string json, string rootName = null)
 {
     using (var reader = SerializationUtil.JsonReaderFromJsonText(json))
     {
         return(Create(reader, rootName));
     }
 }
Exemplo n.º 2
0
 public static IFhirReader CreateFhirReader(string json)
 {
     // [WMR 20160421] Explicit disposal
     // return new JsonDomFhirReader(SerializationUtil.JsonReaderFromJsonText(json));
     using (var reader = SerializationUtil.JsonReaderFromJsonText(json))
     {
         // [WMR 20160421] Safely dispose reader after executing JsonDomFhirReader ctor
         return(new JsonDomFhirReader(reader));
     }
 }
        public static ISourceNode Parse(string json, string rootName = null, FhirJsonParsingSettings settings = null)
        {
            if (json == null)
            {
                throw Error.ArgumentNull(nameof(json));
            }

            using (var reader = SerializationUtil.JsonReaderFromJsonText(json))
            {
                return(Read(reader, rootName, settings));
            }
        }
        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));
            }
        }