--- JSON-XS/XS.pm 2007/08/27 01:49:01 1.59 +++ JSON-XS/XS.pm 2007/08/27 02:03:23 1.60 @@ -312,6 +312,17 @@ "k2": "v2", <- this comma not normally allowed } +=item * 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... + ] + =back =item $json = $json->canonical ([$enable])