Skip to content

Commit

Permalink
- Fix isDefinedBy value object
Browse files Browse the repository at this point in the history
  • Loading branch information
haideriqbal committed Aug 28, 2024
1 parent b4baa7a commit 5acda2b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dataload/linker/src/main/java/LinkerPass1.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,21 @@ public static void parseEntity(JsonReader jsonReader, String entityType, String
for(JsonElement isDefinedBy : arr) {
if (isDefinedBy.isJsonObject()) {
JsonObject obj = isDefinedBy.getAsJsonObject();
definedBy.add(obj.get("value").getAsString());
var value = obj.get("value");
if (value.isJsonObject()) {
definedBy.add(value.getAsJsonObject().get("value").getAsString());
} else
definedBy.add(value.getAsString());
} else
definedBy.add( isDefinedBy.getAsString() );
}
} else if (jsonDefinedBy.isJsonObject()) {
JsonObject obj = jsonDefinedBy.getAsJsonObject();
definedBy.add(obj.get("value").getAsString());
var value = obj.get("value");
if (value.isJsonObject()) {
definedBy.add(value.getAsJsonObject().get("value").getAsString());
} else
definedBy.add(value.getAsString());
}
else {
definedBy.add(jsonDefinedBy.getAsString());
Expand Down

0 comments on commit 5acda2b

Please sign in to comment.