diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/JsonParser.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/JsonParser.java index dba168178..49e1900a7 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/JsonParser.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/JsonParser.java @@ -140,7 +140,9 @@ public class JsonParser extends ParserBase { obj = org.hl7.fhir.utilities.json.parser.JsonParser.parseObject(source, true, true); } - ctxt.setElement(parse(ctxt.getErrors(), obj)); + if (obj != null) { + ctxt.setElement(parse(ctxt.getErrors(), obj)); + } List res = new ArrayList<>(); res.add(ctxt); @@ -150,6 +152,9 @@ public class JsonParser extends ParserBase { } public Element parse(List errors, JsonObject object) throws FHIRException { + if (object == null) { + System.out.println("What?"); + } StructureDefinition sd = getLogical(); String name; String path;