Skip to content

Instantly share code, notes, and snippets.

@suprnova32
Created April 20, 2013 18:04
Show Gist options
  • Select an option

  • Save suprnova32/5426840 to your computer and use it in GitHub Desktop.

Select an option

Save suprnova32/5426840 to your computer and use it in GitHub Desktop.
JSON nested object
// lets add some headers (nested JSON object)
JSONObject header = new JSONObject();
header.put("devicemodel", android.os.Build.MODEL); // Device model
header.put("deviceVersion", android.os.Build.VERSION.RELEASE); // Device OS version
header.put("language", Locale.getDefault().getISO3Language()); // Language
jsonobj.put("header", header);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment