Package ca.uhn.fhir.parser.json
Interface JsonLikeStructure
-
- All Known Implementing Classes:
GsonStructure
public interface JsonLikeStructure
This interface is the generic representation of any sort of data structure that looks and smells like JSON. These data structures can be abstractly viewed as aor Listwhose members are other Maps, Lists, or scalars (Strings, Numbers, Boolean)- Author:
- Bill.Denton
-
-
Method Summary
All Methods Instance Methods Abstract 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)
-
-
-
Method Detail
-
getInstance
JsonLikeStructure getInstance()
-
load
void load(Reader theReader) throws DataFormatException
Parse the JSON document into the Json-like structure so that it can be navigated.- Parameters:
theReader- aReaderthat will process the JSON input stream- Throws:
DataFormatException- when invalid JSON is received
-
load
void load(Reader theReader, boolean allowArray) throws DataFormatException
- Throws:
DataFormatException
-
getRootObject
JsonLikeObject getRootObject() throws DataFormatException
- Throws:
DataFormatException
-
getRootArray
JsonLikeArray getRootArray() throws DataFormatException
- Throws:
DataFormatException
-
getJsonLikeWriter
JsonLikeWriter getJsonLikeWriter()
-
getJsonLikeWriter
JsonLikeWriter getJsonLikeWriter(Writer writer)
-
-