--- JSON-XS/README 2007/08/27 02:03:23 1.17 +++ JSON-XS/README 2007/08/28 02:06:06 1.18 @@ -270,6 +270,17 @@ "k2": "v2", <- this comma not normally allowed } + * shell-style '#'-comments + Whenever JSON allows whitespace, shell-style comments are + additionally allowed. They are terminated by the first + carriage-return or line-feed character, after which more + white-space and comments are allowed. + + [ + 1, # this comment not allowed in JSON + # neither this one... + ] + $json = $json->canonical ([$enable]) If $enable is true (or missing), then the "encode" method will output JSON objects by sorting their keys. This is adding a