[jOOQ/jOOQ#10082] Add JSON.json() and JSONB.jsonb() methods

This commit is contained in:
Lukas Eder 2020-04-17 11:23:13 +02:00
parent 86615abb78
commit 96781ff836
2 changed files with 26 additions and 0 deletions

View File

@ -61,10 +61,23 @@ public final class JSON implements Serializable {
return data;
}
/**
* Create a new {@link JSON} instance from string data input.
*/
public static final JSON valueOf(String data) {
return new JSON(data);
}
/**
* Create a new {@link JSON} instance from string data input.
* <p>
* This is the same as {@link #valueOf(String)}, but it can be static
* imported.
*/
public static final JSON json(String data) {
return new JSON(data);
}
@Override
public int hashCode() {
final int prime = 31;

View File

@ -61,10 +61,23 @@ public final class JSONB implements Serializable {
return data;
}
/**
* Create a new {@link JSONB} instance from string data input.
*/
public static final JSONB valueOf(String data) {
return new JSONB(data);
}
/**
* Create a new {@link JSONB} instance from string data input.
* <p>
* This is the same as {@link #valueOf(String)}, but it can be static
* imported.
*/
public static final JSONB json(String data) {
return new JSONB(data);
}
@Override
public int hashCode() {
final int prime = 31;