Package io.delta.kernel.internal.types
Class DataTypeJsonSerDe
Object
io.delta.kernel.internal.types.DataTypeJsonSerDe
Serialize and deserialize Delta data types
DataType to JSON and from JSON class based on
the serialization
rules outlined in the Delta Protocol.-
Method Summary
Modifier and TypeMethodDescriptionstatic StructTypedeserializeStructType(String structTypeJson) Deserializes a JSON string representing a Delta data type to aDataType.static StringserializeDataType(DataType dataType) Serializes aDataTypeto a JSON string according to the Delta Protocol.static StringserializeStructType(StructType structType) Serializes aStructTypeto a JSON string
-
Method Details
-
serializeStructType
Serializes aStructTypeto a JSON string- Parameters:
structType-- Returns:
-
serializeDataType
Serializes aDataTypeto 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.- Parameters:
dataType-- Returns:
- JSON string representing the data type
-
deserializeStructType
Deserializes a JSON string representing a Delta data type to aDataType.- Parameters:
structTypeJson- JSON string representing aStructTypedata type
-