I just released Module 10 in the Master Class of “REST with Spring”:


This tutorial illustrates the most common Jackson 2 tasks, problems and solutions while marshalling and unmarshalling JSON.

Basic Jackson Marshalling

Learn quickly how to serialize a Java Entity to a JSON String – and control the mapping process perfectly, to reach the exact JSON format you’re aiming for.


Basic Jackson Unmarshalling

Learn how to deserialize a JSON String into a Java Entity – no matter how weird the JSON input is, we need to map it to a well defined Java Entity class.


Advanced Jackson Marshalling

Learn advanced serialization configuration and tuning to deal with conditions, various data types and custom Jackson exceptions.


Advanced Jackson Unmarshalling

Learn more advanced tips and tricks for unmarshalling JSON input into Java Entity classes.


Advanced Jackson Usage

The implementation of all these examples and code snippets can be found in my GitHub project – this is an Eclipse based project, so it should be easy to import and run as it is.

Go deeper into building a REST API with Spring:


Sort by:   newest | oldest | most voted
Tariq Anees
How about Streaming with Jackson API. Can you show an example of extracting an array from JSON format: { “type”: “FeatureCollection”, “crs”: { “type”: “name”, “properties”: { “name”: “urn:ogc:def:crs:OGC:1.3:CRS84” } }, “features”: [ { “type”: “Feature”, “geometry”: { “type”: “MultiPolygon”, “coordinates”: [ [ [ [ -69.996937628999916, 12.577582098000036 ], [ -69.936390753999945, 12.531724351000051 ], [ -69.924672003999945, 12.519232489000046 ], [ -69.915760870999918, 12.497015692000076 ], [ -69.880197719999842, 12.453558661000045 ], [ -69.876820441999939, 12.427394924000097 ], [ -69.888091600999928, 12.417669989000046 ], [ -69.908802863999938, 12.417792059000107 ], [ -69.930531378999888, 12.425970770000035 ], [ -69.945139126999919, 12.44037506700009 ], [ -69.924672003999945, 12.44037506700009 ], [ -69.924672003999945, 12.447211005000014 ], [ -69.958566860999923, 12.463202216000099 ], [ -70.027658657999922, 12.522935289000088 ],… Read more »
Eugen Paraschiv

Hey Tariq,
That might be an interesting topic for an article. My suggestion – if you need to have a quicker answer – have a proper test that can be used to reproduce what you’re trying to achieve – and email me the details. I’d be happy to have a look. Cheers,

Literate Aspects

Hi Eugen, I have been trying to code a servlet for a while that binds remote mysql to a jquery grid, with no success. Is there any chance you might have a look, the JSON string generates but the binding fails in the xhtml view.