-1

I would like to retrieve the following information from a JSON:

{
    "list_folder": {
            "accounts": [
                        "dbid:Aapamskfpano1-l2_12oKKn123o1pk23"
                        ]
    },
    "delta": {
            "users": [
                      12321512
            ]
    }

}

I need both the accounts array and users array. This JSON is in the body.

How I can obtain and parse this?

Lechucico
  • 1,914
  • 7
  • 27
  • 60

1 Answers1

-2

JSONObject json = new JSONObject(jsonString);
MyObject myObject = new Gson().fromJson(jsonString, MyObject.class);


kma
  • 72
  • 1
  • 9
  • 1
    While this code snippet may solve the question, [including an explanation](http://meta.stackexchange.com/questions/114762/explaining-entirely-code-based-answers) really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Also, please indent your code blocks. – Turtle Jul 18 '17 at 08:59