Package org.hl7.fhir.r4.elementmodel
Class JsonParser
- java.lang.Object
-
- org.hl7.fhir.r4.elementmodel.ParserBase
-
- org.hl7.fhir.r4.elementmodel.JsonParser
-
public class JsonParser extends ParserBase
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hl7.fhir.r4.elementmodel.ParserBase
ParserBase.ILinkResolver, ParserBase.ValidationPolicy
-
-
Field Summary
-
Fields inherited from class org.hl7.fhir.r4.elementmodel.ParserBase
context, errors, linkResolver, policy, showDecorations
-
-
Constructor Summary
Constructors Constructor Description JsonParser(IWorkerContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose()protected voidcloseArray()voidcompose(Element e, OutputStream stream, IParser.OutputStyle style, String identity)voidcompose(Element e, JsonCreator json)protected voidopen(String name, String link)protected voidopenArray(String name, String link)Elementparse(com.google.gson.JsonObject object)Elementparse(com.google.gson.JsonObject object, Map<com.google.gson.JsonElement,org.hl7.fhir.utilities.json.JsonTrackingParser.LocationData> map)Elementparse(InputStream stream)Elementparse(String source, String type)voidparseChildItem(String path, com.google.gson.JsonObject object, Element context, Set<String> processed, Property property)protected voidprop(String name, String value, String link)-
Methods inherited from class org.hl7.fhir.r4.elementmodel.ParserBase
getDefinition, getDefinition, getLinkResolver, isPrimitive, isShowDecorations, logError, setLinkResolver, setShowDecorations, setupValidation
-
-
-
-
Constructor Detail
-
JsonParser
public JsonParser(IWorkerContext context)
-
-
Method Detail
-
parse
public Element parse(InputStream stream) throws IOException, org.hl7.fhir.exceptions.FHIRException
- Specified by:
parsein classParserBase- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRException
-
parse
public Element parse(com.google.gson.JsonObject object, Map<com.google.gson.JsonElement,org.hl7.fhir.utilities.json.JsonTrackingParser.LocationData> map) throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
parse
public Element parse(com.google.gson.JsonObject object) throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
parseChildItem
public void parseChildItem(String path, com.google.gson.JsonObject object, Element context, Set<String> processed, Property property)
-
prop
protected void prop(String name, String value, String link) throws IOException
- Throws:
IOException
-
open
protected void open(String name, String link) throws IOException
- Throws:
IOException
-
close
protected void close() throws IOException
- Throws:
IOException
-
openArray
protected void openArray(String name, String link) throws IOException
- Throws:
IOException
-
closeArray
protected void closeArray() throws IOException
- Throws:
IOException
-
compose
public void compose(Element e, OutputStream stream, IParser.OutputStyle style, String identity) throws org.hl7.fhir.exceptions.FHIRException, IOException
- Specified by:
composein classParserBase- Throws:
org.hl7.fhir.exceptions.FHIRExceptionIOException
-
compose
public void compose(Element e, JsonCreator json) throws Exception
- Throws:
Exception
-
-