Interface JSONBuilder

All Known Implementing Classes:
JSONBuilderImpl

@ClassVersion(sourceVersion="$Id: JSONBuilder.java 1258 2026-06-04 18:33:06Z tquadrat $") @API(status=STABLE, since="0.25.0") public sealed interface JSONBuilder permits JSONBuilderImpl

This sealed interface is the main API for the Foundation JSON Builder Library.

getInstance() returns an instance of an implementation for the interface.

Basically, the instances of JSONBuilder are stateless, and therefore they can be treated as thread-safe. Only the indentation that is used for pretty-printing the resulting JSON values may cause issues when different threads are using different values.

The different implementations of JSONValue – particularly JSONObject and JSONArray are not thread-safe.

Author:
Thomas Thrien (thomas.thrien@tquadrat.org)
Version:
$Id: JSONBuilder.java 1258 2026-06-04 18:33:06Z tquadrat $
Since:
0.25.0
UML Diagram
UML Diagram for "org.tquadrat.foundation.jsonbuilder.JSONBuilder"

UML Diagram for "org.tquadrat.foundation.jsonbuilder.JSONBuilder"

UML Diagram for "org.tquadrat.foundation.jsonbuilder.JSONBuilder"