Bug #79136 Improve section on normalization of JSON values
Submitted: 5 Nov 2015 10:27 Modified: 12 Nov 2015 16:41
Reporter: Knut Anders Hatlen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.7+ OS:Any
Assigned to: CPU Architecture:Any
Tags: json

[5 Nov 2015 10:27] Knut Anders Hatlen
Description:
https://dev.mysql.com/doc/refman/5.7/en/json.html#json-normalization describes how JSON values are normalized.

It should also mention that

- the keys of a JSON object will be sorted (this may surprise users, see Bug#79007). I don't think we need to say exactly how they are sorted, but we could mention they are sorted in order to allow faster lookup of the keys.

- whitespace between keys/values/elements in the original document is lost.

Also, it currently says: "The normalized result is not only valid but sensible. MySQL functions that produce JSON values always produce sensible values."

I don't think "sensible" is defined anywhere in the manual. WL#7909 defines it as: "A sensible json document is one which is valid and which contains no object whose members have the same key names." Since the section already has said that a normalized value does not have duplicate key names, I think we could reduce those two sentences to "MySQL functions that produce JSON values always produce normalized values."

How to repeat:
N/A

Suggested fix:
See above.
[12 Nov 2015 16:41] Jon Stephens
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly.