MYSQL JSON column change array order after saving MYSQL JSON column change array order after saving mysql mysql

MYSQL JSON column change array order after saving


The items of arrays don't change order in MySQL JSON columns, but object key/value pairs might.

MySQL manual says:

To make lookups more efficient, it also sorts the keys of a JSON object. You should be aware that the result of this ordering is subject to change and not guaranteed to be consistent across releases.

There is no standard that says it has to be in a certain order, so probably the best thing to do is to speak to someone on 3rd party to adjust validation.