Which one to use? JSONObject from org.json VS JsonObject from javax.json

后端 未结 4 1972
傲寒
傲寒 2020-12-28 12:45

This is my first post. As a budding Android developer, I read SO posts on a near daily basis on various topics, but for this question, I didn\'t find any help from Google or

4条回答
  •  不知归路
    2020-12-28 13:13

    I recommend you to use Google's json-simple toolkit in order to work with JSON Objects. It provides useful functions and has no dependency on external libraries which turned out to be a huge problem during the development of Android apps.

    To answer your question: If you don't want to use json-simple in you project you should use the JSONObject from org.json, because it's provided by the Android JDK. For further information see http://developer.android.com/reference/org/json/JSONObject.html.

提交回复
热议问题