Class JsonUtils
- java.lang.Object
-
- org.apache.beam.sdk.schemas.utils.JsonUtils
-
@Experimental(SCHEMAS) public class JsonUtils extends java.lang.Object
Utils to convert JSON records to BeamRow
.
-
-
Constructor Summary
Constructors Constructor Description JsonUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SimpleFunction<byte[],Row>
getJsonBytesToRowFunction(Schema beamSchema)
Returns aSimpleFunction
mapping JSON byte[] arrays to BeamRow
s.static SimpleFunction<java.lang.String,Row>
getJsonStringToRowFunction(Schema beamSchema)
static SimpleFunction<Row,byte[]>
getRowToJsonBytesFunction(Schema beamSchema)
Returns aSimpleFunction
mapping BeamRow
s to JSON byte[] arrays.static SimpleFunction<Row,java.lang.String>
getRowToJsonStringsFunction(Schema beamSchema)
-
-
-
Method Detail
-
getJsonBytesToRowFunction
public static SimpleFunction<byte[],Row> getJsonBytesToRowFunction(Schema beamSchema)
Returns aSimpleFunction
mapping JSON byte[] arrays to BeamRow
s.
-
getJsonStringToRowFunction
public static SimpleFunction<java.lang.String,Row> getJsonStringToRowFunction(Schema beamSchema)
-
getRowToJsonBytesFunction
public static SimpleFunction<Row,byte[]> getRowToJsonBytesFunction(Schema beamSchema)
Returns aSimpleFunction
mapping BeamRow
s to JSON byte[] arrays.
-
getRowToJsonStringsFunction
public static SimpleFunction<Row,java.lang.String> getRowToJsonStringsFunction(Schema beamSchema)
-
-