Skip to content

Commit

Permalink
Merge pull request #4247 from kwvanderlinde/bugfix/4161-json-constant…
Browse files Browse the repository at this point in the history
…s-are-not-json-values

Fix json.* constants to keep a GSON representation
  • Loading branch information
cwisniew authored Aug 14, 2023
2 parents 9b061ef + 6d4afe9 commit acf29bf
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,10 @@ public Object getVariable(String name, VariableModifiers mods) throws ParserExce

Object value;

if (result instanceof JsonArray) {
value = result;
} else if (result instanceof JsonObject) {
if (result instanceof JsonArray
|| result instanceof JsonObject
|| result instanceof JsonNull
|| (result instanceof JsonPrimitive primitive && primitive.isBoolean())) {
value = result;
} else if (result instanceof BigDecimal) {
value = result;
Expand Down

0 comments on commit acf29bf

Please sign in to comment.