ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/JSON-XS/XS.pm
(Generate patch)

Comparing JSON-XS/XS.pm (file contents):
Revision 1.141 by root, Fri Oct 25 19:53:08 2013 UTC vs.
Revision 1.142 by root, Fri Oct 25 19:57:42 2013 UTC

1006 1006
1007=over 4 1007=over 4
1008 1008
1009=item hash references 1009=item hash references
1010 1010
1011Perl hash references become JSON objects. As there is no inherent ordering 1011Perl hash references become JSON objects. As there is no inherent
1012in hash keys (or JSON objects), they will usually be encoded in a 1012ordering in hash keys (or JSON objects), they will usually be encoded
1013pseudo-random order that can change between runs of the same program but 1013in a pseudo-random order. JSON::XS can optionally sort the hash keys
1014stays generally the same within a single run of a program. JSON::XS can 1014(determined by the I<canonical> flag), so the same datastructure will
1015optionally sort the hash keys (determined by the I<canonical> flag), so 1015serialise to the same JSON text (given same settings and version of
1016the same datastructure will serialise to the same JSON text (given same 1016JSON::XS), but this incurs a runtime overhead and is only rarely useful,
1017settings and version of JSON::XS), but this incurs a runtime overhead 1017e.g. when you want to compare some JSON text against another for equality.
1018and is only rarely useful, e.g. when you want to compare some JSON text
1019against another for equality.
1020 1018
1021=item array references 1019=item array references
1022 1020
1023Perl array references become JSON arrays. 1021Perl array references become JSON arrays.
1024 1022

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines