Skip to content

Instantly share code, notes, and snippets.

@rasheedamir
Created July 30, 2016 19:18
Show Gist options
  • Select an option

  • Save rasheedamir/2cca0b5ea0b446ee6f87395670c57646 to your computer and use it in GitHub Desktop.

Select an option

Save rasheedamir/2cca0b5ea0b446ee6f87395670c57646 to your computer and use it in GitHub Desktop.
java code to convert json to hashmap using Google Gson library
String jsonBody = "Your JSON String";
HashMap<String, ArrayList<Map<String, Object>>> resultMap = new Gson().fromJson(jsonBody, new TypeToken<HashMap<String, ArrayList<Map<String, Object>>>>(){}.getType());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment