JSON Deserializing with Json Parsing in an Android App

What does "Json deserialization" mean, I have seen this term on the Internet. I do not know the meaning of this particular term. It would be great if someone could explain to me what this means.

+2
source share
1 answer

JSON is a method of representing data in a light text form. For example, an array of contacts in the phone book can be saved as follows;

{"contacts": [ {"name": John, "phoneNumber":"+44000000000"}, {"name": Jack, "phoneNumber":"+44000000001"} ]} 

This is the primary goal to use when transporting data to web services. This seems to be especially popular in REST.

Serializing your data in JSON is the process of converting what may be "Array ()" in your Java code into a textual representation of that data, as shown above. JSON de-serialization is the process in reverse order. In the above example, JSON deserialization is the process of translating text for the above contacts into a data array in your Java application.

Fortunately, the Android SDK makes it easy to access the JSON library that will handle this process for you. http://developer.android.com/reference/org/json/JSONObject.html

And the next GSON library makes life easier. http://sites.google.com/site/gson/gson-user-guide

There is a REST group on the Internet with Android examples, they will almost certainly be able to help you.

http://s Senior.ceng.metu.edu.tr/2009/praeda/2009/01/11/a-simple-restful-client-at-android/

http://www.josecgomez.com/2010/04/30/android-accessing-restfull-web-services-using-json/

+18
source

Source: https://habr.com/ru/post/975857/


All Articles