Remove quote from the JSONArray output

后端 未结 13 1878
野性不改
野性不改 2021-01-02 02:45

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:



        
13条回答
  •  难免孤独
    2021-01-02 03:27

    Convert the JSONValue back to String:

    String.ValueOf(testValue);
    

    Or

    childJSONObject.getString("name");
    

    After all this and still end up with quotes - then fall back on RegExp.

    testValue.toString().replaceAll("\"", "");
    

提交回复
热议问题