APIs in
org.json library implement JSON encoders/decoders in Java. This library has the
capability to convert between JSON and XML, HTTP headers, Cookies, and CDL.
I am going
to use below maven dependency.
<!--
https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180813</version>
</dependency>
In this
tutorial series, you are going to learn following things.
Create Json Document
Construct a json object from string
Convert java object to json string
Create JSONObject from map
Working with JSONArray
Create JSONArray from JSON String
Create JSONArray from a collection, list, set, queue
Convert comma separated string to JSONArray
Convert JSONArray to comma separated string
Produce JSONArray of json object from comma separated string
Convert cookie to json object
Convert JSONObject to a cookie string
Convert http header to json object
Convert JSONObject to http header
Pretty Print json
Construct a json object from string
Convert java object to json string
Create JSONObject from map
Working with JSONArray
Create JSONArray from JSON String
Create JSONArray from a collection, list, set, queue
Convert comma separated string to JSONArray
Convert JSONArray to comma separated string
Produce JSONArray of json object from comma separated string
Convert cookie to json object
Convert JSONObject to a cookie string
Convert http header to json object
Convert JSONObject to http header
Pretty Print json
Reference
No comments:
Post a Comment