org.apache.avro.data
Class Json.Reader
java.lang.Object
org.apache.avro.data.Json.Reader
- All Implemented Interfaces:
- DatumReader<org.codehaus.jackson.JsonNode>
- Enclosing class:
- Json
public static class Json.Reader
- extends Object
- implements DatumReader<org.codehaus.jackson.JsonNode>
DatumReader
for arbitrary Json data.
Method Summary |
org.codehaus.jackson.JsonNode |
read(org.codehaus.jackson.JsonNode reuse,
Decoder in)
Read a datum. |
void |
setSchema(Schema schema)
Set the writer's schema. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Json.Reader
public Json.Reader()
setSchema
public void setSchema(Schema schema)
- Description copied from interface:
DatumReader
- Set the writer's schema.
- Specified by:
setSchema
in interface DatumReader<org.codehaus.jackson.JsonNode>
read
public org.codehaus.jackson.JsonNode read(org.codehaus.jackson.JsonNode reuse,
Decoder in)
throws IOException
- Description copied from interface:
DatumReader
- 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.
- Specified by:
read
in interface DatumReader<org.codehaus.jackson.JsonNode>
- Throws:
IOException
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.