} else { String elementName = elem.getName().getLocalPart(); parserState.enteringNewElement(namespaceURI, elementName);
String nextName = alternateName.substring(1); if (theObject.get(nextName) == null) { theState.enteringNewElement(null, nextName); parseAlternates(nextValue, theState, alternateName, alternateName); theState.endingElement();
String nextName = alternateName.substring(1); if (nextExtObj.get(nextName) == null) { theState.enteringNewElement(null, nextName); parseAlternates(nextValue, theState, alternateName, alternateName); theState.endingElement();
public <T extends IBaseResource> T doParseResource(Class<T> theResourceType, JsonLikeStructure theJsonStructure) { JsonLikeObject object = theJsonStructure.getRootObject(); JsonLikeValue resourceTypeObj = object.get("resourceType"); if (resourceTypeObj == null || !resourceTypeObj.isString() || isBlank(resourceTypeObj.getAsString())) { throw new DataFormatException("Invalid JSON content detected, missing required element: 'resourceType'"); } String resourceType = resourceTypeObj.getAsString(); ParserState<? extends IBaseResource> state = ParserState.getPreResourceInstance(this, theResourceType, myContext, true, getErrorHandler()); state.enteringNewElement(null, resourceType); parseChildren(object, state); state.endingElement(); state.endingElement(); @SuppressWarnings("unchecked") T retVal = (T) state.getObject(); return retVal; }
} else { String elementName = elem.getName().getLocalPart(); parserState.enteringNewElement(namespaceURI, elementName);
theState.enteringNewElement(null, theName); parseAlternates(theAlternateVal, theState, theAlternateName, theAlternateName); JsonLikeObject nextObject = theJsonVal.getAsObject(); throw new DataFormatException("Missing required element 'resourceType' from JSON resource object, unable to parse"); theState.enteringNewElement(null, resType.getAsString()); preResource = true; theState.enteringNewElement(null, theName); parseAlternates(theAlternateVal, theState, theAlternateName, theAlternateName); theState.endingElement(); } else { theState.enteringNewElement(null, theName); theState.attributeValue("value", theJsonVal.getAsString()); parseAlternates(theAlternateVal, theState, theAlternateName, theAlternateName);
String nextName = alternateName.substring(1); if (nextExtObj.get(nextName) == null) { theState.enteringNewElement(null, nextName); parseAlternates(nextValue, theState, alternateName, alternateName); theState.endingElement();
String nextName = alternateName.substring(1); if (theObject.get(nextName) == null) { theState.enteringNewElement(null, nextName); parseAlternates(nextValue, theState, alternateName, alternateName); theState.endingElement();
public <T extends IBaseResource> T doParseResource(Class<T> theResourceType, JsonLikeStructure theJsonStructure) { JsonLikeObject object = theJsonStructure.getRootObject(); JsonLikeValue resourceTypeObj = object.get("resourceType"); if (resourceTypeObj == null || !resourceTypeObj.isString() || isBlank(resourceTypeObj.getAsString())) { throw new DataFormatException("Invalid JSON content detected, missing required element: 'resourceType'"); } String resourceType = resourceTypeObj.getAsString(); ParserState<? extends IBaseResource> state = ParserState.getPreResourceInstance(this, theResourceType, myContext, true, getErrorHandler()); state.enteringNewElement(null, resourceType); parseChildren(object, state); state.endingElement(); state.endingElement(); @SuppressWarnings("unchecked") T retVal = (T) state.getObject(); return retVal; }
theState.enteringNewElement(null, theName); parseAlternates(theAlternateVal, theState, theAlternateName, theAlternateName); JsonLikeObject nextObject = theJsonVal.getAsObject(); throw new DataFormatException("Missing required element 'resourceType' from JSON resource object, unable to parse"); theState.enteringNewElement(null, resType.getAsString()); preResource = true; theState.enteringNewElement(null, theName); parseAlternates(theAlternateVal, theState, theAlternateName, theAlternateName); theState.endingElement(); } else { theState.enteringNewElement(null, theName); theState.attributeValue("value", theJsonVal.getAsString()); parseAlternates(theAlternateVal, theState, theAlternateName, theAlternateName);