You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Francis Galiegue <fg...@gmail.com> on 2013/03/05 03:41:25 UTC

json-schema-avro: Avro to JSON Schema, and back

Hello,

This project is available here:

https://github.com/fge/json-schema-avro

This project is written in Java, using the Avro Java library, and
allows to translate schemas both ways (Avro to JSON Schema, and JSON
Schema to Avro).

This project being quite new, it has limitations:

* for Avro to JSON Schema, all Avro schemas (in the form of a Schema
as defined by the Java library) have to be self contained;
* for the reverse, given that JSON Schema can describe a very broad
range of JSON values which Avro chooses not to describe, the range of
translatable schemas is reduced.

That does not prevent however to generate quite complex Avro schemas
from JSON Schemas -- even unions within a map within an array within a
record field will work.

Many things are missing; in particular, the ability to choose a
namespace for generated Avro schemas, or even a naming strategy, or
mapping a member name in a JSON Schema to an Avro name, etc etc.

Note that the first processor is demoed online; the second will soon
be available as well, I will post an update when it is.

Cheers,
--
Francis Galiegue, fgaliegue@gmail.com
JSON Schema in Java: http://json-schema-validator.herokuapp.com