Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> Jackson and Avro, nested schema


Copy link to this message
-
Re: Jackson and Avro, nested schema
On Wed, May 8, 2013 at 11:49 AM, David Arthur <[EMAIL PROTECTED]> wrote:
> I have looked at the Json schema included with Avro, but this requires a
> top-level "value" element which I don't want.

There's code in Avro that will read and write Jackson JsonNode
directly, without creating any intermediate "value" structure.

http://avro.apache.org/docs/current/api/java/org/apache/avro/data/Json.html

One should be able to easily write a JsonParser and JsonGenerator that
read and write directly using this schema, so that Jackson's
ObjectCodec could then be used to read and write arbitrary Pojos to
Avro data files.

Doug