avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis Galiegue <fgalie...@gmail.com>
Subject json-schema-avro: Avro to JSON Schema, and back
Date Tue, 05 Mar 2013 02:41:25 GMT

This project is available here:


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.

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

View raw message