From 8d59817d26b2b05a2ceb97ac4bf6408eda96b335 Mon Sep 17 00:00:00 2001 From: Oliver Egger Date: Thu, 14 May 2020 14:25:05 +0200 Subject: [PATCH] json parse r4 --- .../src/main/java/org/hl7/fhir/r4/elementmodel/JsonParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/elementmodel/JsonParser.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/elementmodel/JsonParser.java index c5ae3d979..470397a70 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/elementmodel/JsonParser.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/elementmodel/JsonParser.java @@ -183,7 +183,7 @@ public class JsonParser extends ParserBase { } public void parseChildItem(String path, JsonObject object, Element context, Set processed, Property property) { - if (property.isChoice()) { + if (property.isChoice() || property.getDefinition().getPath().endsWith("data[x]")) { for (TypeRefComponent type : property.getDefinition().getType()) { String eName = property.getName().substring(0, property.getName().length()-3) + Utilities.capitalize(type.getWorkingCode()); if (!isPrimitive(type.getWorkingCode()) && object.has(eName)) {