Fwd: An experiment: Avro schema to JSON Schema conversion

1,465 views
Skip to first unread message

Francis Galiegue

unread,
Mar 1, 2013, 9:49:04 AM3/1/13
to json-...@googlegroups.com
FYI

---------- Forwarded message ----------
From: Francis Galiegue <fgal...@gmail.com>
Date: Fri, Mar 1, 2013 at 1:19 PM
Subject: An experiment: Avro schema to JSON Schema conversion
To: us...@avro.apache.org


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, fgal...@gmail.com
JSON Schema in Java: http://json-schema-validator.herokuapp.com


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

vrushank...@gmail.com

unread,
Jun 27, 2017, 3:00:56 PM6/27/17
to JSON Schema
Hi Francis,

I have a use case where i need to convert avro schema to json schema. I went through your github code but it was difficult for me to understand as which methods should i use to get the work done. 

Could you please give me a sample on how can i use your code to get a json schema out of avro schema ? 

Your guidance will help me a lot.

Thanks,
Vrushank D.
Reply all
Reply to author
Forward
0 new messages