Skip to content

Commit

Permalink
fix #2282
Browse files Browse the repository at this point in the history
issue with parsing JSON Object
  • Loading branch information
Nouxx committed Aug 2, 2021
1 parent 6337095 commit e957a8a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,13 @@ public String getFromJson(String jsonMessage, String url, String attributeToFind
double tryFloat = JsonPath.read(document, jsonPath);
return String.valueOf(tryFloat);
} catch (Exception exFloat) {
return DEFAULT_GET_FROM_JSON_VALUE;
try {
LOG.debug("JSON PATH trying Object : " + jsonPath);
Object tryObject = JsonPath.read(document, jsonPath);
return tryObject.toString();
} catch (Exception exObject) {
return DEFAULT_GET_FROM_JSON_VALUE;
}
}
}
}
Expand Down

0 comments on commit e957a8a

Please sign in to comment.