Class JsonHelper
java.lang.Object
org.hibernate.type.descriptor.jdbc.JsonHelper
A Helper for serializing and deserializing JSON, based on an
EmbeddableMappingType.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <X> XarrayFromString(JavaType<X> javaType, JdbcType elementJdbcType, String string, WrapperOptions options) static <X> Xdeserialize(EmbeddableMappingType embeddableMappingType, JsonDocumentReader reader, boolean returnEmbeddable, WrapperOptions options) Deserialize a JSON value to Java Objectstatic <X> XdeserializeArray(JavaType<X> javaType, JdbcType elementJdbcType, JsonDocumentReader reader, WrapperOptions options)
-
Constructor Details
-
JsonHelper
public JsonHelper()
-
-
Method Details
-
deserialize
public static <X> X deserialize(EmbeddableMappingType embeddableMappingType, JsonDocumentReader reader, boolean returnEmbeddable, WrapperOptions options) throws SQLException Deserialize a JSON value to Java Object- Type Parameters:
X-- Parameters:
embeddableMappingType- the mapping typereader- the JSON readerreturnEmbeddable- do we return an Embeddable object or array of Objectsoptions- wrappping options- Returns:
- the deserialized value
- Throws:
SQLException
-
arrayFromString
public static <X> X arrayFromString(JavaType<X> javaType, JdbcType elementJdbcType, String string, WrapperOptions options) throws SQLException - Throws:
SQLException
-
deserializeArray
public static <X> X deserializeArray(JavaType<X> javaType, JdbcType elementJdbcType, JsonDocumentReader reader, WrapperOptions options) throws SQLException - Throws:
SQLException
-