[jOOQ/jOOQ#9747] Add Serializable as supertype to JSON and JSONB

This commit is contained in:
Knut Wannheden 2020-01-20 09:17:08 +01:00
parent 6bdaee9d42
commit 7407843d1b
2 changed files with 10 additions and 4 deletions

View File

@ -37,6 +37,8 @@
*/
package org.jooq;
import java.io.Serializable;
/**
* A JSON wrapper type for JSON data obtained from the database.
* <p>
@ -46,9 +48,10 @@ package org.jooq;
* consistent with jOOQ's general way of returning <code>NULL</code> from
* {@link Result} and {@link Record} methods.
*/
public final class JSON {
public final class JSON implements Serializable {
private final String data;
private static final long serialVersionUID = 9067511945508834073L;
private final String data;
private JSON(String data) {
this.data = data;

View File

@ -37,6 +37,8 @@
*/
package org.jooq;
import java.io.Serializable;
/**
* A JSON wrapper type for JSONB data obtained from the database.
* <p>
@ -46,9 +48,10 @@ package org.jooq;
* consistent with jOOQ's general way of returning <code>NULL</code> from
* {@link Result} and {@link Record} methods.
*/
public final class JSONB {
public final class JSONB implements Serializable {
private final String data;
private static final long serialVersionUID = 860591239448066408L;
private final String data;
private JSONB(String data) {
this.data = data;