java.lang.Object
org.jooq.JSONB
- All Implemented Interfaces:
Serializable
A JSON wrapper type for JSONB data obtained from the database.
The wrapper represents JSONB data() in serialised string form. A
CAST(NULL AS JSONB) value is represented by a null
reference of type JSONB, not as data() == null. This is
consistent with jOOQ's general way of returning NULL from
Result and Record methods.
Unlike the purely text based, formatting-preserving JSON data type,
the JSONB type uses a normalised representation of the JSON content,
meaning that e.g. the following two documents are equal, despite their
different object attribute order and formatting:
{"a":1,"b":2}{"b": 2, "a": 1}
This impacts the behaviour (and performance!) of
The data() content, however, is not normalised.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfinal @NotNull Stringdata()booleaninthashCode()static final @NotNull JSONBCreate a newJSONBinstance from string data input.static final @Nullable JSONBjsonbOrNull(String data) toString()static final @NotNull JSONBCreate a newJSONBinstance from string data input.
-
Method Details
-
data
-
valueOf
Create a newJSONBinstance from string data input. -
jsonb
Create a newJSONBinstance from string data input.This is the same as
valueOf(String), but it can be static imported. -
jsonbOrNull
-
hashCode
public int hashCode() -
equals
-
toString
-