JSONValue
, JSONObject
, JSONArray
, JSONString, JSONNumber
. Following is an environment set up for JAVA. The following are some API's of Java JSON.
- JSON.org
- GSON
- Jackson
- Boon
pom.xml
.
Output: Now compile the code result will be as follows.
[java]
{"Tutorial Name":"SPLESSONS","Likes per sec":600000.0,"Users":2023478}
[/java]
toJSONString()
strategy. Rather it supersedes the toString() technique to produce json. To get the json object, just utilize obj.toString().
Output: Now compile the code result will be as follows.
[java]{"Tutorial Name":"SPLESSONS","Likes per sec":600000.0,"Users":2023478}[/java]
import org.json.simple.JSONArray;
.
Output: Now compile the code result will be as follows.
[java]
["SPLESSON",2733,3600000.0]
[/java]
POM
stands for Project Object Model
.