public class DataTypeJsonSerDe
extends Object
DataType to JSON and from JSON class based on
the serialization
rules outlined in the Delta Protocol.| Modifier and Type | Method and Description |
|---|---|
static StructType |
deserializeStructType(String structTypeJson)
Deserializes a JSON string representing a Delta data type to a
DataType. |
static String |
serializeDataType(DataType dataType)
Serializes a
DataType to a JSON string according to the Delta Protocol. |
static String |
serializeStructType(StructType structType)
Serializes a
StructType to a JSON string |
public static String serializeStructType(StructType structType)
StructType to a JSON stringstructType - public static String serializeDataType(DataType dataType)
DataType to a JSON string according to the Delta Protocol. TODO: Only
reason why this API added was due to Flink-Kernel dependency. Currently Flink-Kernel uses the
Kernel DataType.toJson and Standalone DataType.fromJson to convert between types.dataType - public static StructType deserializeStructType(String structTypeJson)
DataType.structTypeJson - JSON string representing a StructType data type