On 05/20/2010 12:43 AM, Anthony Liguori wrote:

The JSON specification explicitly says:

"A JSON parser transforms a JSON text into another representation. A JSON parser MUST accept all texts that conform to the JSON grammar. A JSON parser MAY accept non-JSON forms or extensions."

IOW, we're under no obligation to reject extensions and I can't think of a reason why we should.

At the very least, we should document them. If the extension doesn't add any value but is merely a side effect of the implementation, we should remove it.

Examples where this could hurt us:

- we move to a json parsing library, the extension disappears, client breaks
- someone writes a qemu simulator to test managment tool scalability (run zillions of fake guests on one machine), client breaks - someone writes a debug tool that interposes between client and qemu, client breaks - the json specification adds a new form that conflicts with one of our extensions [1], we can't use the new form

Being strict in what we accept will reduce our support burden later on.

[1] allowing infinite extensibility like this is irresponsible

--
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.


Reply via email to