Any tool/lib available for converting JSON Schema to Avro Schema

1,813 views
Skip to first unread message

Arud selvan sundaramoorthy

unread,
Jan 25, 2021, 7:09:22 PM1/25/21
to JSON Schema
Hi,
I have use case which requires to convert a JSON Schema (uses draft-07 version) to Avro Schema.

Though I could see some tools available in the Internet for converting Json Data (based on the schema) to Avro Schema but it may not satisfy my complete use case. 

Could you let me know any such tools/libraries available which does the JSON Schema to Avro Schema conversion? 

Thanks,
Arud Selvan.S.

Henry Andrews

unread,
Jan 25, 2021, 7:52:31 PM1/25/21
to json-...@googlegroups.com
You couple probably easily build on on top of @cloudflare/json-schema-walker, although I don't think it's been updated since I left the company 2.5 years ago.  It's not that complicated, though, and should be easy to fork and update for newer drafts if you want- it was designed with multi-draft support in mind.

cheers,
-henry


--
You received this message because you are subscribed to the Google Groups "JSON Schema" group.
To unsubscribe from this group and stop receiving emails from it, send an email to json-schema...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/json-schema/e0c88c2b-f189-4060-8521-47932e5281e9n%40googlegroups.com.

Juan Cruz Viotti

unread,
Jan 26, 2021, 10:18:38 AM1/26/21
to 'Henry Andrews' via JSON Schema
As an alternative to @cloudflare/json-schema-traverse, you can also use
https://github.com/epoberezkin/json-schema-traverse, which I believe its
better maintained and part of the popular AJV project.

> Hi, I have use case which requires to convert a JSON Schema (uses
> draft-07 version) to Avro Schema.

Hi Arud, what is your use case, out of curiosity, as I'm working in the
JSON Schema + schema-driven serialization formats like Avro field?

On Tue, Jan 26, 2021 at 12:52:26AM +0000, 'Henry Andrews' via JSON Schema wrote:
> You couple probably easily build on on top of @cloudflare/json-schema-walker, although I don't think it's been updated since I left the company 2.5 years ago.  It's not that complicated, though, and should be easy to fork and update for newer drafts if you want- it was designed with multi-draft support in mind.
> cheers,-henry
>
> On Monday, January 25, 2021, 04:15:36 PM PST, Arud selvan sundaramoorthy <aruds...@gmail.com> wrote:
>
> Hi,I have use case which requires to convert a JSON Schema (uses draft-07 version) to Avro Schema.
> Though I could see some tools available in the Internet for converting Json Data (based on the schema) to Avro Schema but it may not satisfy my complete use case. 
>
> Could you let me know any such tools/libraries available which does the JSON Schema to Avro Schema conversion? 
>
> Thanks,Arud Selvan.S.
>
> --
> You received this message because you are subscribed to the Google Groups "JSON Schema" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to json-schema...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/json-schema/e0c88c2b-f189-4060-8521-47932e5281e9n%40googlegroups.com.
>
>
> --
> You received this message because you are subscribed to the Google Groups "JSON Schema" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to json-schema...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/json-schema/1492607589.28889.1611622346810%40mail.yahoo.com.

--
Juan Cruz Viotti
Software Engineer
https://www.jviotti.com

Henry Andrews

unread,
Jan 26, 2021, 2:07:02 PM1/26/21
to 'Henry Andrews' via JSON Schema
Oh, good to know - yes, use the one that is actively maintained :-D

On Tuesday, January 26, 2021, 09:48:25 AM PST, Juan Cruz Viotti <j...@jviotti.com> wrote:


As an alternative to @cloudflare/json-schema-traverse, you can also use
https://github.com/epoberezkin/json-schema-traverse, which I believe its
better maintained and part of the popular AJV project.

> Hi, I have use case which requires to convert a JSON Schema (uses
> draft-07 version) to Avro Schema.

Hi Arud, what is your use case, out of curiosity, as I'm working in the
JSON Schema + schema-driven serialization formats like Avro field?

On Tue, Jan 26, 2021 at 12:52:26AM +0000, 'Henry Andrews' via JSON Schema wrote:
>  You couple probably easily build on on top of @cloudflare/json-schema-walker, although I don't think it's been updated since I left the company 2.5 years ago.  It's not that complicated, though, and should be easy to fork and update for newer drafts if you want- it was designed with multi-draft support in mind.
> cheers,-henry
>
>    On Monday, January 25, 2021, 04:15:36 PM PST, Arud selvan sundaramoorthy <aruds...@gmail.com> wrote: 

>  Hi,I have use case which requires to convert a JSON Schema (uses draft-07 version) to Avro Schema.
> Though I could see some tools available in the Internet for converting Json Data (based on the schema) to Avro Schema but it may not satisfy my complete use case. 
>
> Could you let me know any such tools/libraries available which does the JSON Schema to Avro Schema conversion? 
>
> Thanks,Arud Selvan.S.
>
> --
> You received this message because you are subscribed to the Google Groups "JSON Schema" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to json-schema+unsub...@googlegroups.com.

> To view this discussion on the web visit https://groups.google.com/d/msgid/json-schema/e0c88c2b-f189-4060-8521-47932e5281e9n%40googlegroups.com.

>
> --
> You received this message because you are subscribed to the Google Groups "JSON Schema" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to json-schema+unsub...@googlegroups.com.

> To view this discussion on the web visit https://groups.google.com/d/msgid/json-schema/1492607589.28889.1611622346810%40mail.yahoo.com.

--
Juan Cruz Viotti
Software Engineer
https://www.jviotti.com

--
You received this message because you are subscribed to the Google Groups "JSON Schema" group.
To unsubscribe from this group and stop receiving emails from it, send an email to json-schema+unsub...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/json-schema/YBAyPREeAE9UbLUp%40hemig.local.

Reply all
Reply to author
Forward
0 new messages