diff --git a/jOOQ/src/main/java/org/jooq/JSON.java b/jOOQ/src/main/java/org/jooq/JSON.java index dae1a34fe8..6344034631 100644 --- a/jOOQ/src/main/java/org/jooq/JSON.java +++ b/jOOQ/src/main/java/org/jooq/JSON.java @@ -39,6 +39,12 @@ package org.jooq; /** * A JSON wrapper type for JSON data obtained from the database. + *
+ * The wrapper represents JSON {@link #data()} in serialised string form. A
+ * CAST(NULL AS JSON) value is represented by a null
+ * reference of type {@link JSON}, not as data() == null. This is
+ * consistent with jOOQ's general way of returning NULL from
+ * {@link Result} and {@link Record} methods.
*/
public final class JSON {
diff --git a/jOOQ/src/main/java/org/jooq/JSONB.java b/jOOQ/src/main/java/org/jooq/JSONB.java
index 9d12488b00..9d8fd93474 100644
--- a/jOOQ/src/main/java/org/jooq/JSONB.java
+++ b/jOOQ/src/main/java/org/jooq/JSONB.java
@@ -39,6 +39,12 @@ package org.jooq;
/**
* A JSON wrapper type for JSONB data obtained from the database.
+ *
+ * The wrapper represents JSONB {@link #data()} in serialised string form. A
+ * CAST(NULL AS JSONB) value is represented by a null
+ * reference of type {@link JSONB}, not as data() == null. This is
+ * consistent with jOOQ's general way of returning NULL from
+ * {@link Result} and {@link Record} methods.
*/
public final class JSONB {