In this article we will learn how to use the Java Multi-line feature and and we can combine it with String Templates to create complex Object structures such as JSON payloads or even JSON Objects!
JSON arrays are a fundamental data structure in JSON, used to store collections of values or objects. Java provides the
JsonArrayBuilder classes from the Jakarta JSON API to efficiently create, manipulate, and parse JSON arrays. It also provides methods to parse a JSON Array into a Java Collection. In this tutorial we will see both options with practical examples
This tutorial will teach you how to use the Jakarta JSON Processing API from standalone Java applications. At the end of it, you will be able to create simple scripts in Java to manipulate, serialize and deserialize JSON content at scale.
When working with JSON data, readability matters. JSON pretty printing is a technique used to format JSON data in a human-readable manner, making it easier to analyze, debug, and understand. In this tutorial, we’ll explore how to perform JSON pretty printing in Java, leveraging libraries to format JSON for improved readability.
In today’s data-driven world, the ability to effectively parse and process JSON data has become an essential skill for Java developers. This tutorial will guide you through the fundamentals of parsing JSON data using the Jakarta JSON API framework which includes two main models: JSON Processing (JSON-P) and JSON Binding (JSON-B). Binding and Processing JSON … Read more
Filtering through a JSON document using Java 8 Stream API involves converting the JSON document into a stream of objects and then using the filter method to select the objects that match a given condition. Here are the steps to filter through a JSON document using Java 8 Stream API.
JSON-B and Jackson are both libraries that can be used for parsing and generating JSON data in Java. However, they have some differences in their functionality and usage. This tutorial will discuss them in detail.
This tutorial shows how to use JSON Processing (JSR-353) API, part of the Jakarta EE specification. In general terms, there are two main APIs to handle JSON in Java: JSON-P (JSON-Processing, JSR 374): Specifies a very low-level processing library which can be carried out with two models for JSON processing: the Object Model API and the Streaming … Read more
This tutorial will teach you how to navigate or modify a JSON Document using a JSON Pointer, which is available in javax.json API. Put it simply, a JSON Pointer is a string that references an element within a JSON document. By using a JSON pointer, an application can retrieve a value, but it can modify … Read more
In this tutorial we will learn about JSON-B, which is a standard binding layer for converting Java objects to/from JSON messages, included as part of JSR 367 Specification (Java EE 8). In general terms, there are two main APIs to handle JSON in Java: JSON-P (JSON-Processing, JSR 374): Specifies a very low-level processing library which … Read more