[ad_1]
How to remove a Json key. I looked for some examples on the portal itself, but none solved what I need.
i need to eliminate a json property, is it possible to do? It is like?
public JsonObject getData() {
JsonObject jsonObj = Json.createObjectBuilder()
.add("instanceType", "XXXXX")
.build();
return jsonObj;
}
the json output is like this:
{
"instanceType": {
"chars": "XXXXX",
"string": "XXXXX",
"valueType": "STRING"
}
}
but I need it to look like this:
{
"instanceType": {
"string": "XXXXXX",
"valueType": "STRING"
}
}
[ad_2]