public class JsonRowSerializationSchema extends Object implements SerializationSchema<Row>
Serializes the input Row
object into a JSON string and
converts it into byte[]
.
Result byte[]
messages can be deserialized using
JsonRowDeserializationSchema
.
Constructor and Description |
---|
JsonRowSerializationSchema(String[] fieldNames)
Creates a JSON serialization schema for the given fields and types.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
serialize(Row row)
Serializes the incoming element to a specified type.
|
public JsonRowSerializationSchema(String[] fieldNames)
fieldNames
- Names of JSON fields to parse.public byte[] serialize(Row row)
SerializationSchema
serialize
in interface SerializationSchema<Row>
row
- The incoming element to be serializedCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.