Class TolerantJsonParser

java.lang.Object
ca.uhn.fhir.parser.BaseParser
ca.uhn.fhir.parser.JsonParser
ca.uhn.fhir.jpa.dao.TolerantJsonParser
All Implemented Interfaces:
ca.uhn.fhir.parser.IJsonLikeParser, ca.uhn.fhir.parser.IParser

public class TolerantJsonParser extends ca.uhn.fhir.parser.JsonParser
  • Nested Class Summary

    Nested classes/interfaces inherited from class ca.uhn.fhir.parser.BaseParser

    ca.uhn.fhir.parser.BaseParser.CompositeChildElement, ca.uhn.fhir.parser.BaseParser.EncodeContext
  • Field Summary

    Fields inherited from class ca.uhn.fhir.parser.BaseParser

    RESOURCE_CREATED_BY_PARSER
  • Constructor Summary

    Constructors
    Constructor
    Description
    TolerantJsonParser(ca.uhn.fhir.context.FhirContext theContext, ca.uhn.fhir.parser.IParserErrorHandler theParserErrorHandler, Long theResourcePid)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    createWithLenientErrorHandling(ca.uhn.fhir.context.FhirContext theContext, Long theResourcePid)
     
    <T extends org.hl7.fhir.instance.model.api.IBaseResource>
    T
    parseResource(Class<T> theResourceType, String theMessageString)
     

    Methods inherited from class ca.uhn.fhir.parser.JsonParser

    doEncodeResourceToJsonLikeWriter, doEncodeResourceToWriter, doParseResource, doParseResource, encodeResourceToJsonLikeWriter, getEncoding, parseResource, parseResource, setPrettyPrint

    Methods inherited from class ca.uhn.fhir.parser.BaseParser

    compositeChildIterator, encodeResourceToString, encodeResourceToWriter, encodeResourceToWriter, extractMetadataListNotNull, fixContainedResourceId, getCompositeElementId, getContext, getDontStripVersionsFromReferencesAtPaths, getEncodeForceResourceId, getErrorHandler, getExtensionMetadataKeys, getExtensionUrl, getMetaTagsForEncoding, getPreferTypes, getProfileTagsForEncoding, getServerBaseUrl, getStripVersionsFromReferences, getSuppressNarratives, isChildContained, isEncodeElementsAppliesToChildResourcesOnly, isFhirVersionLessThanOrEqualTo, isOmitResourceId, isSummaryMode, isSuppressNarratives, parseResource, parseResource, parseResource, parseResource, parseResource, preProcessValues, setDontEncodeElements, setDontStripVersionsFromReferencesAtPaths, setDontStripVersionsFromReferencesAtPaths, setEncodeElements, setEncodeElementsAppliesToChildResourcesOnly, setEncodeForceResourceId, setOmitResourceId, setOverrideResourceIdWithBundleEntryFullUrl, setParserErrorHandler, setPreferTypes, setServerBaseUrl, setStripVersionsFromReferences, setSummaryMode, setSuppressNarratives, shouldAddSubsettedTag, shouldEncodePath, shouldEncodeResource, shouldEncodeResourceId, shouldEncodeResourceMeta, throwExceptionForUnknownChildType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface ca.uhn.fhir.parser.IParser

    encodeResourceToString, encodeResourceToWriter, getDontStripVersionsFromReferencesAtPaths, getEncodeForceResourceId, getPreferTypes, getStripVersionsFromReferences, isEncodeElementsAppliesToChildResourcesOnly, isOmitResourceId, isSummaryMode, parseResource, parseResource, parseResource, parseResource, parseResource, setDontEncodeElements, setDontStripVersionsFromReferencesAtPaths, setDontStripVersionsFromReferencesAtPaths, setEncodeElements, setEncodeElementsAppliesToChildResourcesOnly, setEncodeForceResourceId, setOmitResourceId, setOverrideResourceIdWithBundleEntryFullUrl, setParserErrorHandler, setPreferTypes, setServerBaseUrl, setStripVersionsFromReferences, setSummaryMode, setSuppressNarratives
  • Constructor Details

    • TolerantJsonParser

      public TolerantJsonParser(ca.uhn.fhir.context.FhirContext theContext, ca.uhn.fhir.parser.IParserErrorHandler theParserErrorHandler, Long theResourcePid)
      Constructor
      Parameters:
      theResourcePid - The ID of the resource that will be parsed with this parser. It would be ok to change the datatype for this param if we ever need to since it's only used for logging.
  • Method Details

    • parseResource

      public <T extends org.hl7.fhir.instance.model.api.IBaseResource> T parseResource(Class<T> theResourceType, String theMessageString)
      Specified by:
      parseResource in interface ca.uhn.fhir.parser.IParser
      Overrides:
      parseResource in class ca.uhn.fhir.parser.BaseParser
    • createWithLenientErrorHandling

      public static TolerantJsonParser createWithLenientErrorHandling(ca.uhn.fhir.context.FhirContext theContext, @Nullable Long theResourcePid)