Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #64926, comment 8


Ignore:
Timestamp:
03/25/2026 11:18:15 AM (3 months ago)
Author:
zieladam
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #64926, comment 8

    v1 v2  
    1818Does that help?
    1919
    20 In any case, transforming arbitrary JSON objects into the bracket notation is lossy. There's to way to distinguish between `null` and `undefined`, or string `"false"` and boolean `false`, string `"10"` and number `10`, an array `["hello"]` and an object `{0: "hello"}` etc. It's just a wrong tool for passing arbitrary JSON structures.
     20In any case, transforming arbitrary JSON objects into the bracket notation is lossy. There's to way to distinguish between `null` and `undefined`, or string `"false"` and boolean `false`, string `"10"` and number `10`, an array `["hello"]` and an object `{0: "hello"}` etc. It's just a wrong tool for encoding arbitrary JSON structures as they won't decode to the initial input. In other words, `decode_from_brackets(encode_as_brackets(data)) !== data`.