Jackson JSON Views 1. Overview In this tutorial, we’ll go over how to use Jackson JSON Views to serialize/deserialize objects, customize the views and finally – how to start integrating with Spring. 2. Serialize Using JSON Views First – let’s go through a simple example – serialize an object with… Continue Reading jackson-json-view-annotation

Get a Value by Key in a JSONArray 1. Overview JSON is a light-weight and language independent data-interchange format used for most client-server communications. JSONObject and JSONArray are the two common classes usually available in most of the JSON processing libraries. A JSONObject stores unordered key-value pairs, much like a… Continue Reading java-jsonarray-get-value-by-key

Introduction to JSON-Java (org.json) 1. Introduction to JSON-Java JSON (an acronym for JavaScript Object Notation) is a lightweight data-interchange format and is most commonly used for client-server communication. It’s both easy to read/write and language-independent. A JSON value can be another JSON object, array, number, string, boolean (true/false) or null.… Continue Reading java-org-json

Load Spring Boot Properties From a JSON File 1. Introduction Use external configuration properties is quite a common pattern. And, one of the most common questions is the ability to change the behavior of our application in multiple environments – such as development, test, and production – without having to change… Continue Reading spring-boot-json-properties

Mapping a Dynamic JSON Object with Jackson 1. Introduction Working with predefined JSON data structures with Jackson is straightforward. However, sometimes we need to handle dynamic JSON objects, which have unknown properties. In this short tutorial, we’ll see multiple ways of mapping dynamic JSON objects into Java classes. Note that in… Continue Reading jackson-mapping-dynamic-object