Please help me understand the differences between IETF standard JSON schema and Avro schema. I google a lot but couldn't find anything concrete.
Asked
Active
Viewed 1,398 times
1 Answers
3
The key difference is this:
IETF JSON schemas are schemas for JSON values; i.e. JSON objects and JSON arrays
Avro schemas are schemas for Avro values.
Both JSON schemas and Avro schemas are expressed in 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.
A second difference is that IETF JSON schemas venture into areas such as validation (of values), schemas referencing other schemas and so forth. Thus, you could say that JSON schemas have a broader scope than Avro schemas. (But you don't have to make use of this if it isn't relevant to your use-cases.)

Stephen C
- 698,415
- 94
- 811
- 1,216
-
2Since Avro schemas are expressed in JSON, one can have a JSON Schema to describe the structure of an Avro schema. It's schemas all the way down :) – Ether Jan 18 '22 at 18:37
-
1I assume that you meant to say *"one can have a JSON Schema to describe the structure of **all Avro schemas**"*. – Stephen C Jan 18 '22 at 22:36
-
@Ether Avro also has IDL schema definitions – OneCricketeer Jan 19 '22 at 22:46
-
@Ether - Eventually someone figures out how model schemas in themselves :-) – Stephen C Jan 21 '22 at 05:41