Snippets

From Java to JSON

  1. Creating a JSONObject from scratch
  2. Creating a JSONObject from a JSON formatted string
  3. Creating a JSONObject from a Map
  4. Creating a JSONObject from a JavaBean
  5. Creating a JSONArray from scratch
  6. Creating a JSONArray from a JSON formatted string
  7. Creating a JSONArray from a Collection
  8. Creating a JSONArray from an array
  9. Exclude properties
  10. Exclude properties (with filters)

From JSON to Java

  1. JSONObject to DynaBean
  2. JSONObject to JavaBean
  3. JSONArray to List
  4. JSONArray to array
  5. JSONArray to array (type conversion)
  6. JSONObject to JavaBean, exclude properties with filters

From Java to JSON

Creating a JSONObject from scratch

[Index|From Java to JSON]

Creating a JSONObject from a JSON formatted string

[Index|From Java to JSON]

Creating a JSONObject from a Map

[Index|From Java to JSON]

Creating a JSONObject from a JavaBean

[Index|From Java to JSON]

Creating a JSONArray from scratch

[Index|From Java to JSON]

Creating a JSONArray from a JSON formatted string

[Index|From Java to JSON]

Creating a JSONArray from a Collection

[Index|From Java to JSON]

Creating a JSONArray from an array

[Index|From Java to JSON]

Exclude properties

[Index|From Java to JSON]

Exclude properties (with filters)

[Index|From Java to JSON]

From JSON to Java

JSONObject to DynaBean

[Index|From JSON to Java]

JSONObject to JavaBean

[Index|From JSON to Java]

JSONArray to List

[Index|From JSON to Java]

JSONArray to array

[Index|From JSON to Java]

JSONArray to array (type conversion)

[Index|From JSON to Java]

JSONObject to JavaBean, exclude properties with filters

[Index|From JSON to Java]