public final class StructuredRecordStringConverter extends Object
StructuredRecord to and from json.| Modifier and Type | Method and Description |
|---|---|
static co.cask.cdap.api.data.format.StructuredRecord |
fromDelimitedString(String delimitedString,
String delimiter,
co.cask.cdap.api.data.schema.Schema schema)
Converts a delimited string to a
StructuredRecord based on the schema. |
static co.cask.cdap.api.data.format.StructuredRecord |
fromJsonString(String json,
co.cask.cdap.api.data.schema.Schema schema)
Converts a json string to a
StructuredRecord based on the schema. |
static String |
toDelimitedString(co.cask.cdap.api.data.format.StructuredRecord record,
String delimiter)
Converts a
StructuredRecord to a delimited string. |
static String |
toJsonString(co.cask.cdap.api.data.format.StructuredRecord record)
Converts a
StructuredRecord to a json string. |
public static String toJsonString(co.cask.cdap.api.data.format.StructuredRecord record) throws IOException
StructuredRecord to a json string.IOExceptionpublic static co.cask.cdap.api.data.format.StructuredRecord fromJsonString(String json, co.cask.cdap.api.data.schema.Schema schema) throws IOException
StructuredRecord based on the schema.IOExceptionpublic static String toDelimitedString(co.cask.cdap.api.data.format.StructuredRecord record, String delimiter)
StructuredRecord to a delimited string.public static co.cask.cdap.api.data.format.StructuredRecord fromDelimitedString(String delimitedString, String delimiter, co.cask.cdap.api.data.schema.Schema schema)
StructuredRecord based on the schema.Copyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.