Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2019-12-08 15:48:18


Bjorn Reese wrote:

> Secondly, the json::reader and json::writer processors do not change the
> order of key-value pair. If the data structure used by the user preserves
> the order, then so will the serialization.

As I already stated in a previous message, if your reader can only read what
your writer writes, your format is JSON in name only. A "real" JSON reader
must be able to read not just the literal output of the writer, but a
modified JSON file that is (per spec) equivalent to the original. Which
includes reordered fields, as you yourself wrote in the very previous
paragraph.

> Firstly, JSON Object is unordered, so any key permutation is a valid
> syntax. ECMA-404 is quite explicit about this.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk