More Jackson Annotations 1. Overview This article covers some additional annotations that were not covered in the previous article, A Guide to Jackson Annotations – we will go through seven of these. 2. @JsonIdentityReference @JsonIdentityReference is used for customization of references to objects that will be serialized as object identities… Continue Reading jackson-advanced-annotations

Serialize Only Fields that meet a Custom Criteria with Jackson 1. Overview This tutorial is going to illustrate how we can use Jackson to only serialize a field if it meets a specific, custom criteria. For example, say we only want to serialize an integer value if it’s positive –… Continue Reading jackson-serialize-field-custom-criteria

XML Serialization and Deserialization with Jackson 1. Overview In this tutorial, we’re going to look at how to serialize Java objects to XML data using Jackson 2.x and deserialize it back to a POJO. We’ll focus on the basic operation that doesn’t require a lot of complexity or customization. 2.… Continue Reading jackson-xml-serialization-and-deserialization

Deserialize Immutable Objects with Jackson 1. Overview In this quick tutorial, we’ll show two different ways of deserializing immutable Java objects with the Jackson JSON processing library. 2. Why Do We Use Immutable Objects? An immutable object is an object that keeps its state intact since the very moment of… Continue Reading jackson-deserialize-immutable-objects

Calling Default Serializer from Custom Serializer in Jackson 1. Introduction Serializing our complete data structure to JSON using an exact one-on-one representation of all the fields may not be appropriate sometimes or simply may not be what we want. Instead, we may want to create an extended or simplified view… Continue Reading jackson-call-default-serializer-from-custom-serializer