Posted In: JSON

How to convert ArrayList to JSON object in Java

  1. Example will use following Test data   2. Using GSON   3. Using Jackson 2X   4. Using Jackson 1X   5. Using com.jsoniter.output.JsonStream from json iterator library   6. Using net.sf.json.JSONArrayfrom net.sf.json-lib library   7. Using javax.json.JsonArray, javax.json.JsonArrayBuilder from javax.json library   8. Using org.json.JSONArray from org.json library   9. Output [“val1″,”val2″,”val3″,”val4″,”val5”] […]

Read More

Tags: , , , , , , , , ,

by , on February 22nd, 2017

  • Categories