in reply to Re^2: Preserve the order in JSON
in thread Preserve the order in JSON

> saying the keys are unordered by definition and why should they want that anyway

AFAIR is this disputed, because different RFC tell differently.

JS Objects are unsorted tho and JSON stands for "JS Object Notation".

The curlies in JS { ... } create literal objects (kind of hashes plus inheritance chain).

Different definitions will lead to much confusion...

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^4: Preserve the order in JSON
by afoken (Chancellor) on Sep 11, 2023 at 14:59 UTC
    AFAIR is this disputed, because different RFC tell differently.

    It's even worse: It is not clear if object keys MUST be unique or not. They surely SHOULD be unique. Here is the entire mess: Re^4: Outputting JSON with sorted names/keys.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)