|
|
-
An experiment: Avro schema to JSON Schema conversionFrancis Galiegue 2013-03-01, 12:19
Hello,
I've had a little fun and could make a full Avro Schema to JSON Schema conversion processor: http://json-schema-validator.herokuapp.com/avro.jsp It uses the Avro Java library to parse the schema, and a series of "translators" then translate each Avro type to their matching JSON Schema. All Avro schemas you can think of can be translated, with the current limitation that they must be self contained. In the future, I'll split this processor into its own package and maybe add support for Avro schema "bundles". Interesting note: since the output of the processor is an input for the validation chain of my Java JSON Schema validation library, it means you can use an Avro schema and validate JSON data directly using the generated JSON Schemas! Fun, I tell you. -- Francis Galiegue, [EMAIL PROTECTED] JSON Schema in Java: http://json-schema-validator.herokuapp.com |