| Modifier and Type | Class and Description |
|---|---|
| private static enum | Json.JsonType
Note this enum must be kept aligned with the union in Json.avsc. |
| public static class | Json.ObjectReader
|
| public static class | Json.ObjectWriter
|
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final JsonFactory | |
| pack-priv static final ObjectMapper | |
| public static final Schema | SCHEMA
The schema for Json data. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Object | parseJson(String s)
Parses a JSON string and converts it to the object model described in
|
| private static JsonNode | |
| private static Object | |
| public static String | toString(Object datum)
Converts an instance of the object model described in
|
| private static void | |
| private static void |
| FACTORY | back to summary |
|---|---|
| pack-priv static final JsonFactory FACTORY | |
| MAPPER | back to summary |
|---|---|
| pack-priv static final ObjectMapper MAPPER | |
| SCHEMA | back to summary |
|---|---|
| public static final Schema SCHEMA The schema for Json data. | |
| Json | back to summary |
|---|---|
| private Json() | |
| parseJson | back to summary |
|---|---|
| public static Object parseJson(String s) Parses a JSON string and converts it to the object model described in
| |
| read | back to summary |
|---|---|
| private static JsonNode read(Decoder in) throws IOException Read Json data from Avro data. | |
| readObject | back to summary |
|---|---|
| private static Object readObject(Decoder in) throws IOException | |
| toString | back to summary |
|---|---|
| public static String toString(Object datum) Converts an instance of the object model described in
| |
| write | back to summary |
|---|---|
| private static void write(JsonNode node, Encoder out) throws IOException Write Json data as Avro data. | |
| writeObject | back to summary |
|---|---|
| private static void writeObject(Object datum, Encoder out) throws IOException | |
Note
this enum must be kept aligned with the union in Json.avsc.
| Modifier and Type | Field and Description |
|---|---|
| public static final Json. | |
| public static final Json. | |
| public static final Json. | |
| public static final Json. | |
| public static final Json. | |
| public static final Json. | |
| public static final Json. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Json. | |
| public static Json. |
| ARRAY | back to summary |
|---|---|
| public static final Json. | |
| BOOLEAN | back to summary |
|---|---|
| public static final Json. | |
| DOUBLE | back to summary |
|---|---|
| public static final Json. | |
| LONG | back to summary |
|---|---|
| public static final Json. | |
| NULL | back to summary |
|---|---|
| public static final Json. | |
| OBJECT | back to summary |
|---|---|
| public static final Json. | |
| STRING | back to summary |
|---|---|
| public static final Json. | |
| JsonType | back to summary |
|---|---|
| private JsonType() | |
| valueOf | back to summary |
|---|---|
| public static Json. | |
| values | back to summary |
|---|---|
| public static Json. | |
DatumReader for arbitrary Json data using the object model described
in org.apache.avro.JsonProperties .
| Modifier and Type | Field and Description |
|---|---|
| private ResolvingDecoder | |
| private Schema |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public void | setSchema(Schema schema)
Implements org. |
| resolver | back to summary |
|---|---|
| private ResolvingDecoder resolver | |
| written | back to summary |
|---|---|
| private Schema written | |
| ObjectReader | back to summary |
|---|---|
| public ObjectReader() | |
| read | back to summary |
|---|---|
| public Object read(Object reuse, Decoder in) throws IOException Implements org. Doc from org. Read a datum. Traverse the schema, depth-first, reading all leaf values in the schema into a datum that is returned. If the provided datum is non-null it may be reused and returned.
| |
| setSchema | back to summary |
|---|---|
| public void setSchema(Schema schema) Implements org. Doc from org. Set the writer's schema.
| |
DatumWriter for arbitrary Json data using the object model described
in org.apache.avro.JsonProperties .
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void |
| ObjectWriter | back to summary |
|---|---|
| public ObjectWriter() | |
| setSchema | back to summary |
|---|---|
| public void setSchema(Schema schema) Implements org. Doc from org. Set the schema.
| |
| write | back to summary |
|---|---|
| public void write(Object datum, Encoder out) throws IOException Implements org. Doc from org. Write a datum. Traverse the schema, depth first, writing each leaf value in the schema from the datum to the output.
| |