The Value of JSON Values

The Value of JSON Values

This article introduces json-values, a pure functional Java library to work with JSON. Pure functional Java library to work with Json using persistent data structures. A declarative API with validators, generators and a fast parser.

Pure functional Java library to work with Json using persistent data structures. A declarative API with validators, generators and a fast parser.

This article introduces json-values, a pure functional Java library to work with JSON. In this first article, we'll see some impressive recursive data structures to model essential concepts in software development like data validation, data generation, and parsers.

The first and most important virtue of json-values is that JSON objects are immutable and implemented with persistent data structures, better known in FP jargon as values. As Pat Hellan said, immutability changes everything.

It's a fact that, when possible, working with values leads to code with fewer bugs, is more readable, and is easier to maintain. Item 17 of Effective Java states that we must minimize mutability. Still, sometimes it's at the cost of losing performance because the copy-on-write approach is very inefficient for significant data structures. Here is where persistent data structures come into play.

Most functional languages, like Haskell, Clojure, and Scala, implement persistent data structures natively. Java doesn't. The best alternative I've found in the JVM ecosystem is the persistent collections provided by the library vavr. It provides a well-designed API and has a good performance.

The standard Java programmer finds it strange to work without objects and all the machinery of frameworks and annotations.FP is all about functions and values; that's it. I will try to cast some light on how we can manipulate JSON with json-values following a purely functional approach.

java json programming developer

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How to Install OpenJDK 11 on CentOS 8

What is OpenJDK? OpenJDk or Open Java Development Kit is a free, open-source framework of the Java Platform, Standard Edition (or Java SE).

Java Software Development Company | Java Development Services USA

INEXTURE Java Development Company in USA, Offering Complete range of Java Development Services, Java Web application & Mobile app Development services.

Top Java Mobile App Development Company in USA

AppClues Infotech is a top Mobile App Development Company in USA building high-quality Android, iOS, and Native apps for Startups, SMBs, & Enterprises. Contact us now!

Best Java App Development Company in USA & India

AppClues Infotech is a top Mobile App Development Company in USA building high-quality Android, iOS, and Native apps for Startups, SMBs, & Enterprises. Contact us now!

Best Java App Development Services provider in USA

AppClues Infotech is a top Mobile App Development Company in USA building high-quality Android, iOS, and Native apps for Startups, SMBs, & Enterprises. Contact us now!