public static class JsonRowDeserializationSchema.Builder extends Object
JsonRowDeserializationSchema
.Constructor and Description |
---|
Builder(String jsonSchema)
Creates a JSON deserialization schema for the given JSON schema.
|
Builder(TypeInformation<Row> typeInfo)
Creates a JSON deserialization schema for the given type information.
|
Modifier and Type | Method and Description |
---|---|
JsonRowDeserializationSchema |
build() |
JsonRowDeserializationSchema.Builder |
failOnMissingField()
Configures schema to fail if a JSON field is missing.
|
JsonRowDeserializationSchema.Builder |
ignoreParseErrors()
Configures schema to fail when parsing json failed.
|
public Builder(TypeInformation<Row> typeInfo)
typeInfo
- Type information describing the result type. The field names of Row
are used to parse the JSON properties.public Builder(String jsonSchema)
jsonSchema
- JSON schema describing the result typepublic JsonRowDeserializationSchema.Builder failOnMissingField()
By default, a missing field is ignored and the field is set to null.
public JsonRowDeserializationSchema.Builder ignoreParseErrors()
By default, an exception will be thrown when parsing json fails.
public JsonRowDeserializationSchema build()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.