There is not currently a standard Avro json-encoded file format.

Note that most Avro implementations don't support the JSON encoding, and
we want file formats to be maximally interoperable, so we perhaps
shouldn't encourage folks to use the JSON encoding for persistent data.

I have in one instance used the following textual format for
JSON-encoded Avro data:
 - first line of file is schema
 - one JSON object per following line in file, conforming to schema

Perhaps we could standardize on something like this if there are
applications for an Avro textual, line-based file format.

Doug

On 07/13/2011 01:27 PM, Wei Yang wrote:
> I read somewhere that it's suppose to be easy to switch between binary
> encoding and json encoding for application testing and debugging. I also
> read that schemas were always added to the data output so the schema
> file itself is not required on the reader side. But after playing around
> with the code, I only figured out how save the schema with the data in
> binary (DataFileWriter method) or without the schema in json (Encoder
> method). That's when I became confused as to which method to use and if
> its possible to save data in json with a schema.
> 

Reply via email to