In this Boon JSON Parser tutorial, we will learn how to Convert JSON to Java object and Convert Java Object to JSON again using Boon API. … [Read more...]
How to Convert JSON to / from Java Map using JACKSON
In this Jackson example we will learn how to convert JSON to Java Map and vice versa (Convert Java Map to JSON) using Jackson API. Since JSON will be in the form of Key Value pairs it can be easily converted to Java map. … [Read more...]
Jackson 2 JSON Parser – Convert JSON to/from Java Object
In this Jackson 2 JSON Parser example we will learn how to Convert JSON to Java object and Convert Java Object to JSON again using Jackson 2 API. … [Read more...]
Jackson Tree Model Example – JsonNode
In this Jackson Tree Model Example, we will learn how to convert Java Object to JSON and vice-versa ( JSON to Java object). Jackson Tree Model creates a tree representation of a JSON similar to DOM Tree. Hence it is possible to traverse through each node. Jackson provides JsonNode API through we will be accessing the individual node using the node name.The readTree and … [Read more...]
How to write JSON object to File in Java?
In my previous article we have learnt How to read JSON file in Java, now let's see how we can write JSON Object to File in Java. Here also we will be using the JSON.simple library download the json-simple-1.1.1.jar (or) if you are running on maven add the below dependency to your pom.xml <dependency> <groupId>com.googlecode.json-simple</groupId> … [Read more...]
How to read JSON file in Java – JSONObject and JSONArray
What is JSON ? JSON stands for JavaScript Object Notation. JSON is one of the widely used data-interchange format as it is a lightweight data-interchange format and language independent and it started to slowly replace the XML format. In this tutorial, we will see how to use JSON.simple to read JSON file. We will be using JSONObject and JSONArray to perform the JSON read … [Read more...]