Possible Duplicate:
JSON Parsing in Android
I am working on app in which i want to parse request from server side. Can anyone help me in this , i mean to say i simply want to know that how to parse json....
Possible Duplicate:
JSON Parsing in Android
I am working on app in which i want to parse request from server side. Can anyone help me in this , i mean to say i simply want to know that how to parse json....
To parse JSON you can use the JSON library included in Android.
String json = "{\"type\":\"resource_updates\" }"
JSONObject object = new JSONObject(json);
String type = object.getString("type"));
Also see http://developer.android.com/reference/org/json/JSONObject.html for all available get methods
Android has build in support for json library you can check this api org.json
you can use other libraries as well like Gson or jackson you need to add them to your build path first to use them
Check out these two questions on SO as well
Sending and Parsing JSON Objects
I need a simple java example of processing a JSON response via HTTP for Android App?
The data you are sending is not valid base 64 data since, among other things, you have newline characters in the base 64-string. Also, the string is too long so it doesn't even show your whole question.
You can add a JSON library for Java.
Here's how to do it: http://www.vogella.de/blog/2010/02/11/java-library-jar-android/