In this post under JSONB, I will explain the purpose of JsonbCreator annotation with an example. Whenever we deserialize a json data to java object, it is required that the Class of the object should have default/no argument constructor, so that JSONB runtime can create an instance of the class with the help of the…… Continue reading Using JsonbCreator annotation
Category: Deserialization
Deserialization of java objects present in JSON format from a file
This post will explain how to read the serialized (JSON) form of Java objects from a file. Person public class Person { private String fName; private String lName; private int age; public String getfName() { return fName; } public void setfName(String fName) { this.fName = fName; } public String getlName() { return lName; } public…… Continue reading Deserialization of java objects present in JSON format from a file
Deserialization of java objects from JSON
This post explains de-serialization of java objects to JSON using new Java JSONB api. We need the following jars to run the below example 1) javax.json-1.1.jar 2) jsonb-api-1.0.0.jar 3) yasson-1.0.jar yasson-1.0.jar is reference implemenation which can be obtained from the below link http://json-b.net/download.html In this example we will de-serialize the Person object, below is the…… Continue reading Deserialization of java objects from JSON