简体   繁体   English

IETF 标准 JSON 架构和 Avro 架构之间的差异

[英]Differences between IETF standard JSON schema and Avro schema

Please help me understand the differences between IETF standard JSON schema and Avro schema.请帮助我了解 IETF 标准 JSON 架构和 Avro 架构之间的区别。 I google a lot but couldn't find anything concrete.我用谷歌搜索了很多,但找不到任何具体的东西。

The key difference is this:关键区别在于:

  • IETF JSON schemas are schemas for JSON values; IETF JSON 模式JSON 值的模式; ie JSON objects and JSON arrays即 JSON 对象和 JSON arrays

  • Avro schemas are schemas for Avro values. Avro 模式Avro 值的模式。

Both JSON schemas and Avro schemas are expressed in JSON. JSON 模式和 Avro 模式都JSON 表示。 But the type systems that they describe are different.但是他们描述的类型系统是不同的。 For example, Avro has 6 kinds of complex types compared to JSON's 2 kinds.例如,Avro 有 6 种复杂类型,而 JSON 有 2 种。


A second difference is that IETF JSON schemas venture into areas such as validation (of values), schemas referencing other schemas and so forth.第二个区别是 IETF JSON 模式涉足诸如(值的)验证、引用其他模式的模式等领域。 Thus, you could say that JSON schemas have a broader scope than Avro schemas.因此,您可以说 JSON 模式比 Avro 模式具有更广泛的scope (But you don't have to make use of this if it isn't relevant to your use-cases.) (但如果它与您的用例无关,则不必使用它。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM