public class JsonParser extends BaseParser implements IParser
FhirContext.newJsonParser() to get an instance.BaseParser.CompositeChildElement| Constructor and Description |
|---|
JsonParser(FhirContext theContext,
IParserErrorHandler theParserErrorHandler)
Do not use this constructor, the recommended way to obtain a new instance of the JSON parser is to invoke
FhirContext.newJsonParser(). |
| Modifier and Type | Method and Description |
|---|---|
void |
doEncodeBundleToWriter(Bundle theBundle,
Writer theWriter) |
protected void |
doEncodeResourceToWriter(IBaseResource theResource,
Writer theWriter) |
<T extends IBaseResource> |
doParseResource(Class<T> theResourceType,
Reader theReader) |
void |
encodeTagListToWriter(TagList theTagList,
Writer theWriter)
Encodes a tag list, as defined in the FHIR
Specification.
|
EncodingEnum |
getEncoding()
Which encoding does this parser instance produce?
|
<T extends IBaseResource> |
parseBundle(Class<T> theResourceType,
Reader theReader)
Parse a DSTU1 style Atom Bundle.
|
TagList |
parseTagList(Reader theReader)
Parses a tag list, as defined in the FHIR
Specification.
|
IParser |
setPrettyPrint(boolean thePrettyPrint)
Sets the "pretty print" flag, meaning that the parser will encode resources with human-readable spacing and
newlines between elements instead of condensing output as much as possible.
|
compositeChildIterator, containResourcesForEncoding, determineReferenceText, determineResourceBaseUrl, encodeBundleToString, encodeBundleToWriter, encodeResourceToString, encodeResourceToWriter, encodeTagListToString, extractMetadataListNotNull, fixContainedResourceId, getEncodeElements, getEncodeElementsAppliesToResourceTypes, getErrorHandler, getMetaTagsForEncoding, getSuppressNarratives, isChildContained, isOmitResourceId, isStripVersionsFromReferences, isSummaryMode, isSuppressNarratives, parseBundle, parseBundle, parseResource, parseResource, parseResource, parseResource, parseTagList, preProcessValues, setEncodeElements, setEncodeElementsAppliesToResourceTypes, setOmitResourceId, setParserErrorHandler, setServerBaseUrl, setStripVersionsFromReferences, setSummaryMode, setSuppressNarratives, shouldAddSubsettedTag, throwExceptionForUnknownChildTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencodeBundleToString, encodeBundleToWriter, encodeResourceToString, encodeResourceToWriter, encodeTagListToString, getEncodeElements, getEncodeElementsAppliesToResourceTypes, isOmitResourceId, isStripVersionsFromReferences, isSummaryMode, parseBundle, parseBundle, parseResource, parseResource, parseResource, parseResource, parseTagList, setEncodeElements, setEncodeElementsAppliesToResourceTypes, setOmitResourceId, setParserErrorHandler, setServerBaseUrl, setStripVersionsFromReferences, setSummaryMode, setSuppressNarrativespublic JsonParser(FhirContext theContext, IParserErrorHandler theParserErrorHandler)
FhirContext.newJsonParser().theParserErrorHandler - public void doEncodeBundleToWriter(Bundle theBundle, Writer theWriter) throws IOException
doEncodeBundleToWriter in class BaseParserIOExceptionprotected void doEncodeResourceToWriter(IBaseResource theResource, Writer theWriter) throws IOException
doEncodeResourceToWriter in class BaseParserIOExceptionpublic <T extends IBaseResource> T doParseResource(Class<T> theResourceType, Reader theReader)
doParseResource in class BaseParserpublic void encodeTagListToWriter(TagList theTagList, Writer theWriter) throws IOException
IParserencodeTagListToWriter in interface IParsertheTagList - The tag list to encode. Must not be null.theWriter - The writer to encode toIOExceptionpublic EncodingEnum getEncoding()
IParsergetEncoding in interface IParserpublic <T extends IBaseResource> Bundle parseBundle(Class<T> theResourceType, Reader theReader)
IParserIParser.parseResource(Class, Reader) with the Bundle class found in the
ca.uhn.hapi.fhir.model.[version].resource package instead.parseBundle in interface IParserpublic TagList parseTagList(Reader theReader)
IParserparseTagList in interface IParsertheReader - A reader which will supply a tag listpublic IParser setPrettyPrint(boolean thePrettyPrint)
IParsersetPrettyPrint in interface IParserthePrettyPrint - The flagthis parser so that method calls can be chained togetherCopyright © 2014–2016 University Health Network. All rights reserved.