On the successful call, I am getting the JSONArray with the key \"objects\" and again the testValue with the key \"name\". The output is Like:
This thread is pretty old, but I stumbled upon the same problem an hour ago and found the correct solution. You have to check for the type of JsonValue and if its a JsonString, you can parse it to JsonString and call its getString() method.
if(val.getValueType().equals(JsonValue.ValueType.STRING)) {
c.setValue(((JsonString) val).getString());
} else {
c.setValue(val.toString());
}