An open API service indexing awesome lists of open source software.

https://github.com/mechero/jackson-serialization-examples

Commonly-used Java JSON serialization examples
https://github.com/mechero/jackson-serialization-examples

deserialization jackson java java-10 json objectmapper serialization

Last synced: about 2 months ago
JSON representation

Commonly-used Java JSON serialization examples

Awesome Lists containing this project

README

        

# Java and JSON - Jackson examples with ObjectMapper

This repository contains the code samples used in the blog post [Java and JSON: Jackson Serialization with ObjectMapper](https://thepracticaldeveloper.com/2018/07/31/java-and-json-jackson-serialization-with-objectmapper/).
Follow the link to get all the information about the examples.

## Contents

The code contains the following examples, all of them in the same JUnit test to you can actually see what's expected as output.

* Serialization
* Jackson – Serialize String
* Jackson – Serialize String to JSON Object
* Jackson – Serialize a List of String
* Jackson – Serialize a Map of String
* Jackson – Serialize a String Wrapper class
* Jackson – Serialize objects with LocalDate (default)
* Jackson – Serialize objects with LocalDate in ISO format
* Deserialization
* Jackson – Deserialize List of Strings
* Jackson – Deserialize and Unwrap Strings
* Jackson – Deserialize values using JsonNode
* Jackson – Deserialize to simple Java object
* Jackson – Deserialize to simple Java object with Empty Constructor
* Jackson – Deserialize to simple Java object using Annotations
* Jackson – Deserialize to a different Java class
* Jackson – Deserialize to Java object ignoring unknown fields with Configuration
* Jackson – Deserialize to Java object ignoring unknown fields with Annotation
* Jackson – Deserialize to a Map
* Jackson – Deserialize to a List of Maps
* Jackson – Deserialize to a List of Objects
* Jackson – Deserialize Optional

[Visit the blog post at The Practical Developer site](https://thepracticaldeveloper.com/2018/07/31/java-and-json-jackson-serialization-with-objectmapper/).