Replies: 2 comments 3 replies
-
cc @codelipenghui @congbobo184 may you have the motivation and use case here? |
Beta Was this translation helpful? Give feedback.
-
I also have been trying to understand this, and find the documentation confusing. I am using the Golang Pulsar client and could not figure out why the My only conclusion is that I have no idea what the intent of JSON Schema in Pulsar actually is. What am I missing? Have I mis-understood the role and purpose of the JSON schema type? |
Beta Was this translation helpful? Give feedback.
-
When checking this section of the doc:
https://pulsar.apache.org/docs/3.0.x/schema-understand/
It's not really clear to me what is the difference between a JSON schema and an AVRO schema.
When I talk about JSON schema I refer to this specification, basically a JSON to define how a JSON payload is composed:
http://json-schema.org/understanding-json-schema/index.html
While with avro i refer to this one, a JSON to define how an AVRO payload is composed:
https://avro.apache.org/docs/
Both the schemas are written in JSON, but their specifications are quite different.
However If i check the Pulsar doc with example in C++ I see that in the AVRO example this string is passed:
while in the JSON example:
Although the two strings are instanced in different ways, the content is pretty similar, and seems they are both respecting the AVRO specification! The only real difference is that the AVRO one has the "namespace" field that is not present in the JSON example.
So what's the point of saying that both JSON and AVRO are supported if seems that in both cases the AVRO specification is used? Am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions