2025-04-13 02:29:38 +02:00
2025-04-13 02:29:38 +02:00
2025-04-12 20:09:20 +02:00
2025-04-13 02:29:38 +02:00
2025-04-12 19:54:39 +02:00
2025-04-12 19:54:39 +02:00
2025-04-12 19:54:39 +02:00
2025-04-12 20:14:37 +02:00
2025-04-12 20:18:57 +02:00

json

A simple JSON library with support for StringTemplates which were available in JDK 21 and 22 as a preview feature and removed again in JDK 23. The library allows placeholders to be used as keys, values and inside strings.

Example

var parameter = "numbers";
var value = List.of(1, 2, 3, 4);
var name = "World";

var json = JSON_OBJECT."""
    {
        \{parameter}: \{value},
        "string": "Hello \{name}!"
    }
    """;

assertEquals(3, json.getArray("numbers").getNumber(2));
assertEquals(JsonString.valueOf("Hello World!"), json.get("string"));

System.out.println(json.toPrettyJsonString());
// {
//     "numbers": [1, 2, 3, 4],
//     "string": "Hello World!"
// }
Description
No description provided
Readme 306 KiB
Languages
Java 100%