org.apache.avro.data

## Class Json.ObjectReader

- java.lang.Object
- - org.apache.avro.data.Json.ObjectReader

- All Implemented Interfaces:
    DatumReader<Object>
  Enclosing class:
    Json

      public static class Json.ObjectReader
      extends Object
      implements DatumReader<Object>

  `DatumReader` for arbitrary Json data using the object model described in `JsonProperties`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ObjectReader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `read(Object 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`

- - ### Constructor Detail

    - #### ObjectReader

          public ObjectReader()

  - ### Method Detail

    - #### setSchema

          public void setSchema(Schema schema)

      Description copied from interface: `DatumReader`
      Set the writer's schema.
      Specified by:
        `setSchema` in interface `DatumReader<Object>`

    - #### read

          public Object read(Object 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<Object>`
      Throws:
        `IOException`

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.