Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
请帮助我了解 IETF 标准 JSON 模式和 Avro 模式之间的区别。我用谷歌搜索了很多,但找不到任何具体的东西。
关键区别在于:
IETF JSON 模式是JSON值的模式;即 JSON 对象和 JSON 数组
Avro 模式是Avro值的模式。
JSON 模式和 Avro 模式都以 JSON表示。但是他们描述的类型系统是不同的。例如,Avro 有 6 种复杂类型,而 JSON 有 2 种。
第二个区别是 IETF JSON 模式涉足诸如(值的)验证、引用其他模式的模式等领域。因此,您可以说 JSON 模式比 Avro 模式具有更广泛的范围。(但如果它与您的用例无关,则不必使用它。)