public final class Json2Schema extends Object
Schema schema.
This class takes in JSON as a string or parsed JSON as JsonElement and converts it to the
Schema. It's recursive in nature and it creates multi-level of Schema.| Constructor and Description |
|---|
Json2Schema() |
| Modifier and Type | Method and Description |
|---|---|
io.cdap.cdap.api.data.schema.Schema |
toSchema(String id,
Row row)
Generates a
Schema given a row. |
public io.cdap.cdap.api.data.schema.Schema toSchema(String id, Row row) throws RecordConvertorException
Schema given a row.id - Schema idSchemaio.cdap.cdap.api.data.schema.UnsupportedTypeExceptionorg.json.JSONExceptionRecordConvertorExceptionCopyright © 2020 CDAP Licensed under the Apache License, Version 2.0.