how to decode json in android

后端 未结 1 812
傲寒
傲寒 2020-12-20 09:44

this is my json data

 [{\"FeedbackId\":\"1\",\"Phoneid\":\"9774d56d682e549c\",\"feedbackdate\":\"2011\\/9 \\/24\",\"GuestName\":\"sdf\",\"Address\":\"sdf\",\         


        
相关标签:
1条回答
  • 2020-12-20 10:03

    You should be able to decode using the org.json package. From here:

    String json = "{"
             + "  \"query\": \"Pizza\", "
             + "  \"locations\": [ 94043, 90210 ] "
             + "}";
    
     JSONObject object = (JSONObject) new JSONTokener(json).nextValue();
     String query = object.getString("query");
     JSONArray locations = object.getJSONArray("locations");
    

    Just use your own JSON instead of theirs.

    0 讨论(0)
提交回复
热议问题