---
title: "Handling JSON in Android"  
description: "Handling JSON in Android"  
author: "Anonymous User"  
published: 2015-10-12  
updated: 2015-10-12  
canonical: https://www.mindstick.com/forum/33507/handling-json-in-android  
category: "android"  
tags: ["android", "json"]  
reading_time: 2 minutes  

---

# Handling JSON in Android

I am working on an [android application](https://www.mindstick.com/forum/33405/how-to-get-the-build-version-number-of-your-android-application), I would like to send [messages](https://www.mindstick.com/news/4166/google-rolling-out-gemini-extensions-for-messages-whatsapp-and-spotify) in the form of JSON [objects](https://www.mindstick.com/forum/145447/what-are-objects) to a Django Server and parse the JSON response from the server and [populate](https://www.mindstick.com/blog/60/populate-records-in-second-listbox-according-to-the-selection-in-first-list-box) a custom listview.\
From the little JSON [knowledge](https://www.mindstick.com/forum/156160/what-is-google-knowledge-graph) I have, I thought this format for the [response from server](https://www.mindstick.com/forum/159315/why-can-not-read-response-from-server)\

```
{  "post": {    "username": "someusername",    "message": "this is a sweet message",    "image": "http://localhost/someimage.jpg",    "time":  "present time"  },}
```

## Replies

### Reply by Anonymous User

Use GSon and Jackson :\

- [GSON](http://sites.google.com/site/gson/gson-user-guide)
- Jackson
- [Jackson jr](https://github.com/FasterXML/jackson-jr) \

We can actually bind to our own POJOs, not some half-assed tree nodes or Lists and Maps. (and at least Jackson allows binding to such things too (perhaps GSON as well, not sure), JsonNode, Map, List, if you really want these instead of 'real' objects)\
Jackson.jr uses same fast Streaming parser/generator as Jackson (jackson-core), but data-binding part is tiny (50kB). Functionality is more limited (no annotations, just regular Java Beans), but performance-wise should be fast, and initialization (first-call) overhead very low as well. So it just might be good choice, especially for smaller apps.\
\
You can use org.json.JSONObject and org.json.JSONTokener you don't need any external libraries since these classes come with [Android](https://www.mindstick.com/articles/13046/10-reasons-why-i-prefer-android-vs-iphone-ios) SDK\
\
\
\


---

Original Source: https://www.mindstick.com/forum/33507/handling-json-in-android

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
