--- JSON-XS/README 2007/03/23 18:33:50 1.4 +++ JSON-XS/README 2007/03/24 01:15:22 1.5 @@ -269,7 +269,8 @@ JSON -> PERL object A JSON object becomes a reference to a hash in Perl. No ordering of - object keys is preserved. + object keys is preserved (JSON does not preserver object key + ordering itself). array A JSON array becomes a reference to an array in Perl. @@ -305,7 +306,7 @@ Perl hash references become JSON objects. As there is no inherent ordering in hash keys, they will usually be encoded in a pseudo-random order that can change between runs of the same program - but stays generally the same within the single run of a program. + but stays generally the same within a single run of a program. JSON::XS can optionally sort the hash keys (determined by the *canonical* flag), so the same datastructure will serialise to the same JSON text (given same settings and version of JSON::XS), but @@ -442,10 +443,11 @@ in the JSON::XS distribution, to make it easy to compare on your own system. - First is a comparison between various modules using a very simple JSON - string, showing the number of encodes/decodes per second (JSON::XS is - the functional interface, while JSON::XS/2 is the OO interface with - pretty-printing and hashkey sorting enabled). + First comes a comparison between various modules using a very short JSON + string (83 bytes), showing the number of encodes/decodes per second + (JSON::XS is the functional interface, while JSON::XS/2 is the OO + interface with pretty-printing and hashkey sorting enabled). Higher is + better: module | encode | decode | -----------|------------|------------| @@ -460,7 +462,7 @@ That is, JSON::XS is 6 times faster than than JSON::DWIW and about 80 times faster than JSON, even with pretty-printing and key sorting. - Using a longer test string (roughly 8KB, generated from Yahoo! Locals + Using a longer test string (roughly 18KB, generated from Yahoo! Locals search API (http://nanoref.com/yahooapis/mgPdGg): module | encode | decode | @@ -476,6 +478,12 @@ Again, JSON::XS leads by far in the encoding case, while still beating every other module in the decoding case. + On large strings containing lots of unicode characters, some modules + (such as JSON::PC) decode faster than JSON::XS, but the result will be + broken due to missing unicode handling. Others refuse to decode or + encode properly, so it was impossible to prepare a fair comparison table + for that case. + RESOURCE LIMITS JSON::XS does not impose any limits on the size of JSON texts or Perl values they represent - if your machine can handle it, JSON::XS will