如何将json模式转换为avro模式

如何将json模式转换为avro模式,json,avro,jsonschema,avro-tools,Json,Avro,Jsonschema,Avro Tools,我的应用程序一直在使用json模式(org.everit.json.schema.schema)来验证json消息是否符合特定格式。我们现在正在考虑转移到Avro模式。这涉及到将以前存储的schema.json文件转换为Avro schema.avsc。此外,当前的行为是,在使用SchemaLoader(例如SchemaLoader.load(JSONObject obj))进行验证后,通过API/schema/create获得JSON格式的schema,并将其存储为schema.JSON格式

我的应用程序一直在使用json模式(org.everit.json.schema.schema)来验证json消息是否符合特定格式。我们现在正在考虑转移到Avro模式。这涉及到将以前存储的schema.json文件转换为Avro schema.avsc。此外,当前的行为是,在使用SchemaLoader(例如SchemaLoader.load(JSONObject obj))进行验证后,通过API/schema/create获得JSON格式的schema,并将其存储为schema.JSON格式

当我们通过API在运行时收到schema.json时,我们还需要一种将它转换为schema.avsc的方法。是否有任何实用程序/工具可用于将schema.json转换为schema.avsc?

看看GitHub。它包括一个简单的命令行界面,用于验证和转换Avro和JSON

用途 JSON到Avro
java-jar json2avro-validator.jar-s user.avcs-i user.json

Avro到JSON

java-jar-json2avro-validator.jar-s user.avcs-i user.avro-m avro2json

Python中有什么东西吗?