[ARTEMIS-3607]: Supporting JsonValues in JsonUtil.addToArray and
JsonUtil.addToObject * When the added Object is of type JsonValue, don't call the toString method on it. Issue: https://issues.apache.org/jira/browse/ARTEMIS-3607
This commit is contained in:
parent
e34677f5c0
commit
dd645d0d4e
|
@ -173,6 +173,8 @@ public final class JsonUtil {
|
|||
addToArray(parameter, objectArrayBuilder);
|
||||
}
|
||||
jsonObjectBuilder.add(key, objectArrayBuilder);
|
||||
} else if (param instanceof JsonValue) {
|
||||
jsonObjectBuilder.add(key, (JsonValue)param);
|
||||
} else {
|
||||
jsonObjectBuilder.add(key, param.toString());
|
||||
}
|
||||
|
@ -218,6 +220,8 @@ public final class JsonUtil {
|
|||
addToArray(parameter, objectArrayBuilder);
|
||||
}
|
||||
jsonArrayBuilder.add(objectArrayBuilder);
|
||||
} else if (param instanceof JsonValue) {
|
||||
jsonArrayBuilder.add((JsonValue)param);
|
||||
} else {
|
||||
jsonArrayBuilder.add(param.toString());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue