Package ca.uhn.fhir.parser.json
Class GsonStructure
- java.lang.Object
-
- ca.uhn.fhir.parser.json.GsonStructure
-
- All Implemented Interfaces:
JsonLikeStructure
public class GsonStructure extends Object implements JsonLikeStructure
-
-
Constructor Summary
Constructors Constructor Description GsonStructure()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonLikeStructuregetInstance()JsonLikeWritergetJsonLikeWriter()JsonLikeWritergetJsonLikeWriter(Writer writer)JsonLikeArraygetRootArray()JsonLikeObjectgetRootObject()voidload(Reader theReader)Parse the JSON document into the Json-like structure so that it can be navigated.voidload(Reader theReader, boolean allowArray)voidsetNativeArray(com.google.gson.JsonArray json)voidsetNativeObject(com.google.gson.JsonObject json)
-
-
-
Constructor Detail
-
GsonStructure
public GsonStructure()
-
-
Method Detail
-
setNativeObject
public void setNativeObject(com.google.gson.JsonObject json)
-
setNativeArray
public void setNativeArray(com.google.gson.JsonArray json)
-
getInstance
public JsonLikeStructure getInstance()
- Specified by:
getInstancein interfaceJsonLikeStructure
-
load
public void load(Reader theReader) throws DataFormatException
Description copied from interface:JsonLikeStructureParse the JSON document into the Json-like structure so that it can be navigated.- Specified by:
loadin interfaceJsonLikeStructure- Parameters:
theReader- aReaderthat will process the JSON input stream- Throws:
DataFormatException- when invalid JSON is received
-
load
public void load(Reader theReader, boolean allowArray) throws DataFormatException
- Specified by:
loadin interfaceJsonLikeStructure- Throws:
DataFormatException
-
getJsonLikeWriter
public JsonLikeWriter getJsonLikeWriter(Writer writer)
- Specified by:
getJsonLikeWriterin interfaceJsonLikeStructure
-
getJsonLikeWriter
public JsonLikeWriter getJsonLikeWriter()
- Specified by:
getJsonLikeWriterin interfaceJsonLikeStructure
-
getRootObject
public JsonLikeObject getRootObject() throws DataFormatException
- Specified by:
getRootObjectin interfaceJsonLikeStructure- Throws:
DataFormatException
-
getRootArray
public JsonLikeArray getRootArray() throws DataFormatException
- Specified by:
getRootArrayin interfaceJsonLikeStructure- Throws:
DataFormatException
-
-