Java 26 is boring, and that’s a good thing

A joint article with Lutske de Leeuw.

When people hear “boring tech”, they usually mean old, slow, or not innovative. But in production, boring implies something very different. Boring means predictable, with no surprises. Boring means your system still works at 3 a.m. when nobody wants to debug a memory leak. And boring also means that you can understand your system years after you wrote it.

Many platforms try to impress developers with significant changes, shiny rewrites, or breaking updates. Java took another path. Java optimizes for trust.

That choice has a cost. Java can look conservative next to languages that ship new syntax, stronger type-system guarantees, or more ambitious standard-library features, much faster. From the outside, that can make Java seem like it is standing still, even as the platform improves underneath.

If a Java release feels boring, that usually means:

  • Your code still compiles
  • Your APIs will still work
  • Your upgrade does not turn into a rewrite project

And that’s not a weakness. That’s why Java has survived for decades

TL;DR: Java 26 is usefully boring

If you only remember one thing: Java 26 is not flashy, but it quietly improves the runtime and platform where it matters.

  • JEP 522 (G1 throughput): apps can get faster (often 5-15%) without code changes.
  • JEP 516 (AOT object caching with any GC): better startup behavior, especially for microservices.
  • JEP 517 (HTTP/3): modern protocol support in the standard client, with fallback.
  • JEP 500 (final means final): fewer reflection hacks, more predictable behavior.
  • JEP 504 (remove applets): old, dead tech finally cleaned up.
  • JEP 524, JEP 525, JEP 526, JEP 529, JEP 530: previews/incubator maturing steadily.
Continue reading

Writing a tiny JSON Parser

JSON is one of the foundational data formats, especially with modern REST APIs, but many existing libraries are either large or small and hard to comprehend. In this blog post, I’ll show you how to implement a tiny JSON parser that follows the official JSON grammar directly. This parser will not be the fastest or the most featureful, but it will be good enough for many use cases, where you need to parse simple JSON structures returned by a REST API. The resulting library is femtojson.

TLDR: I built femtojson, a tiny JSON library.

Usage

This library is as minimal as possible, only emitting existing List, Map, and primitive types, instead of custom wrapper classes:

import me.bechberger.util.json.JSONParser;
import java.io.IOException;
import java.util.Map;
import java.util.List;

public class Example {
    public static void main(String[] args) throws IOException {
        // Parse a simple object
        String jsonObject = "{\"name\": \"Alice\", \"age\": 30}";
        Map<String, Object> obj = (Map<String, Object>) JSONParser.parse(jsonObject);
        
        System.out.println(obj.get("name"));  // Output: Alice
        System.out.println(obj.get("age"));   // Output: 30
        
        // Parse an array
        String jsonArray = "[1, 2, 3, 4, 5]";
        List<Object> numbers = (List<Object>) JSONParser.parse(jsonArray);
        
        System.out.println(numbers.get(0)); // Output: 1
        
        // Parse nested structures
        String complexJson = "{\"items\": [1, \"two\", 3.14], \"active\": true}";
        Map<String, Object> complex = (Map<String, Object>) JSONParser.parse(complexJson);
        
        List<Object> items = (List<Object>) complex.get("items");
        System.out.println(items.get(1)); // Output: two
        
        Boolean active = (Boolean) complex.get("active");
        System.out.println(active); // Output: true
    }
}

The library also contains a pretty printer and tests to check that all edge cases are handled properly.

We start this blog post by looking at the grammar:

Continue reading