Package org.apache.flink.formats.json
Class JsonRowSerializationSchema.Builder
- java.lang.Object
-
- org.apache.flink.formats.json.JsonRowSerializationSchema.Builder
-
- Enclosing class:
- JsonRowSerializationSchema
@PublicEvolving public static class JsonRowSerializationSchema.Builder extends Object
Builder forJsonRowSerializationSchema
.
-
-
Constructor Summary
Constructors Constructor Description Builder(String jsonSchema)
Creates a JSON serialization schema for the given JSON schema.Builder(TypeInformation<Row> typeInfo)
Creates a JSON serialization schema for the given type information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonRowSerializationSchema
build()
Finalizes the configuration and checks validity.JsonRowSerializationSchema.Builder
withTypeInfo(TypeInformation<Row> typeInfo)
Sets type information for JSON serialization schema.
-
-
-
Constructor Detail
-
Builder
public Builder(TypeInformation<Row> typeInfo)
Creates a JSON serialization schema for the given type information.- Parameters:
typeInfo
- Type information describing the result type. The field names ofRow
are used to parse the JSON properties.
-
Builder
public Builder(String jsonSchema)
Creates a JSON serialization schema for the given JSON schema.- Parameters:
jsonSchema
- JSON schema describing the result type- See Also:
- http://json-schema.org/
-
-
Method Detail
-
withTypeInfo
public JsonRowSerializationSchema.Builder withTypeInfo(TypeInformation<Row> typeInfo)
Sets type information for JSON serialization schema.- Parameters:
typeInfo
- Type information describing the result type. The field names ofRow
are used to parse the JSON properties.
-
build
public JsonRowSerializationSchema build()
Finalizes the configuration and checks validity.- Returns:
- Configured
JsonRowSerializationSchema
-
-