Question

Why does Apache Avro use JSON to define a schema? Why not use IDL directly to define a schema? What is the advantage in transforming IDL to JSON?

Was it helpful?

Solution

Because JSON is trivially serializable, ubiquitous, and the original schema definition mechanism.

Bear in mind that Avro is platform-neutral, and it must continue to support platforms and libraries that use the original schema def--and that's the schema that's sent in the message. If you started transmitting only IDL then everything would break.

OTHER TIPS

Why reinvent the wheel and define an IDL in some proprietary format if you can use a popular existing format. XML would also fit this bill but XML is very verbose.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top