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
Month: January 2018
Serialization of Java objects to JSON
This post explains 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 serialize the Person object, below is the…… Continue reading Serialization of Java objects to JSON
Retrieving url template parameters in JAX-RS annotated method
In JAX-RS, we can create url templates in the format as shown below http://localhost:8080/JAXRSConcepts/myresources/webresource4/retrieveRecord1/ {parameter_name} where anything between ‘{‘ and ‘}’ acts as places where we can provide parameters when creating the actual url. The name between ‘{‘ and ‘}’ in url template will act as the parameter name. In the actual url the text…… Continue reading Retrieving url template parameters in JAX-RS annotated method