Home » Tag Archives: Jackson

Tag Archives: Jackson

Generating JSON Schema from XSD with JAXB and Jackson

json-logo

In this post, I demonstrate one approach for generating JSON Schema from an XML Schema (XSD). While providing an overview of an approach for creating JSON Schema from XML Schema, this post also demonstrates use of a JAXB implementation (xjc version 2.2.12-b150331.1824 bundled with JDK 9 [build 1.9.0-ea-b68]) and of a JSON/Java binding implementation (Jackson 2.5.4). The steps of this ...

Read More »

Custom Deserializer in Jackson and validation

json-logo

tl;dr: it is important to add input validation to custom json deserializers in Jackson. In RHQ we make use of Json parsing in a few places – be it directly in the as7/Wildfly plugin, be it in the REST-api indirectly via RESTEasy 2.3.5, that already does the heavy lifting. Now we have a bean Link that looks like:     ...

Read More »

How to Use PropertyNamingStrategy in Jackson

json-logo

Jackson api is used extensively to convert json to Object and Object to JSON.So if you have a json string and want to convert it in a java object , create field names of bean same as the fields in json. Jackson follows standard bean convention in mapping json fields to java object fields , but if you have a ...

Read More »

Testing REST with multiple MIME types

spring-interview-questions-answers

1. Overview This article will focus on testing a RESTful Service with multiple Media Types/representations. This is the tenth of a series of articles about setting up a secure RESTful Web Service using Spring and Spring Security with Java based configuration.             The REST with Spring series: Part 1 – Bootstrapping a web application with ...

Read More »

Json deserialization with Jackson and Super type tokens

json-logo

Datatables is a jquery plugin to present tabular information – it can enhance a simple table or can use a AJAX based data and present the information in a tabular form. Datatables requires the data from the server to follow a specific JSON format for it to be displayed on screen. Consider the case where a list of Member entities ...

Read More »

JSON – Jackson to the rescue

json-logo

Sometimes you have to fetch some data from the server in JavaScript, JSON is pretty good choice for this task. Let’s play with the Employer – Employee – Benefit example from the post JPA Demystified (episode 1) – @OneToMany and @ManyToOne mappings. We will use it inside the web application based on Spring Framework. Our first controller will return the ...

Read More »

Develop Restful web services using Spring MVC

json-logo

REST INTRODUCTION From Wikipedia: REST-style architectures consist of clients and servers. Clients initiate requests to servers; servers process requests and return appropriate responses. Requests and responses are built around the transfer of representations of resources. A resource can be essentially any coherent and meaningful concept that may be addressed. As you have read the most important thing in Rest architecture ...

Read More »

Java JSON processing with Jackson

json-logo

JSON (Javascript Object Notation) is becoming a very popular data exchange format. While developing Web applications using Javascript frameworks like YUI, ExtJS, DOJO etc., we can use either XML or JSON to exchange the data between the client and server. Normally we get the response from the server in terms of java objects. Then in Servlets or Action classes we ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close