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
- Host: GitHub
- URL: https://github.com/mechero/jackson-serialization-examples
- Owner: mechero
- Created: 2018-07-22T16:52:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-31T17:58:58.000Z (almost 7 years ago)
- Last Synced: 2025-02-25T20:39:18.625Z (2 months ago)
- Topics: deserialization, jackson, java, java-10, json, objectmapper, serialization
- Language: Java
- Homepage: https://thepracticaldeveloper.com/2018/07/31/java-and-json-jackson-serialization-with-objectmapper/
- Size: 22.5 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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/).