The wrapper represents JSON data() in serialised string form. A
CAST(NULL AS JSON) value is represented by a null
reference of type JSON, not as data() == null. This is
consistent with jOOQ's general way of returning NULL from
Result and Record methods.
Unlike the normalising JSONB data type, the JSON type uses a
purely text based, formatting-preserving representation of the JSON content,
meaning that e.g. the following two documents are not equal, due to
their different object attribute order and formatting:
{"a":1,"b":2}{"b": 2, "a": 1}This impacts the behaviour of
| Modifier and Type | Method and Description |
|---|---|
| public final @NotNull String | |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public int | |
| public static final @NotNull JSON | |
| public static final @Nullable JSON | jsonOrNull(String data)
Create a new |
| public String | |
| public static final @NotNull JSON |
| data | back to summary |
|---|---|
| private final String data | |
| JSON | back to summary |
|---|---|
| private JSON(String data) | |
| data | back to summary |
|---|---|
public final @NotNull String data()
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| json | back to summary |
|---|---|
| public static final @NotNull JSON json(String data) Create a new
This is the same as
| |
| jsonOrNull | back to summary |
|---|---|
| public static final @Nullable JSON jsonOrNull(String data) Create a new
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| valueOf | back to summary |
|---|---|
| public static final @NotNull JSON valueOf(String data) Create a new
| |