--- JSON-XS/XS.pm 2008/03/25 07:46:15 1.94 +++ JSON-XS/XS.pm 2008/03/25 16:56:09 1.95 @@ -1139,104 +1139,6 @@ =back -=head1 COMPARISON - -As already mentioned, this module was created because none of the existing -JSON modules could be made to work correctly. First I will describe the -problems (or pleasures) I encountered with various existing JSON modules, -followed by some benchmark values. JSON::XS was designed not to suffer -from any of these problems or limitations. - -=over 4 - -=item JSON 2.xx - -A marvellous piece of engineering, this module either uses JSON::XS -directly when available (so will be 100% compatible with it, including -speed), or it uses JSON::PP, which is basically JSON::XS translated to -Pure Perl, which should be 100% compatible with JSON::XS, just a bit -slower. - -You cannot really lose by using this module, especially as it tries very -hard to work even with ancient Perl versions, while JSON::XS does not. - -=item JSON 1.07 - -Slow (but very portable, as it is written in pure Perl). - -Undocumented/buggy Unicode handling (how JSON handles Unicode values is -undocumented. One can get far by feeding it Unicode strings and doing -en-/decoding oneself, but Unicode escapes are not working properly). - -No round-tripping (strings get clobbered if they look like numbers, e.g. -the string C<2.0> will encode to C<2.0> instead of C<"2.0">, and that will -decode into the number 2. - -=item JSON::PC 0.01 - -Very fast. - -Undocumented/buggy Unicode handling. - -No round-tripping. - -Has problems handling many Perl values (e.g. regex results and other magic -values will make it croak). - -Does not even generate valid JSON (C<{1,2}> gets converted to C<{1:2}> -which is not a valid JSON text. - -Unmaintained (maintainer unresponsive for many months, bugs are not -getting fixed). - -=item JSON::Syck 0.21 - -Very buggy (often crashes). - -Very inflexible (no human-readable format supported, format pretty much -undocumented. I need at least a format for easy reading by humans and a -single-line compact format for use in a protocol, and preferably a way to -generate ASCII-only JSON texts). - -Completely broken (and confusingly documented) Unicode handling (Unicode -escapes are not working properly, you need to set ImplicitUnicode to -I values on en- and decoding to get symmetric behaviour). - -No round-tripping (simple cases work, but this depends on whether the scalar -value was used in a numeric context or not). - -Dumping hashes may skip hash values depending on iterator state. - -Unmaintained (maintainer unresponsive for many months, bugs are not -getting fixed). - -Does not check input for validity (i.e. will accept non-JSON input and -return "something" instead of raising an exception. This is a security -issue: imagine two banks transferring money between each other using -JSON. One bank might parse a given non-JSON request and deduct money, -while the other might reject the transaction with a syntax error. While a -good protocol will at least recover, that is extra unnecessary work and -the transaction will still not succeed). - -=item JSON::DWIW 0.04 - -Very fast. Very natural. Very nice. - -Undocumented Unicode handling (but the best of the pack. Unicode escapes -still don't get parsed properly). - -Very inflexible. - -No round-tripping. - -Does not generate valid JSON texts (key strings are often unquoted, empty keys -result in nothing being output) - -Does not check input for validity. - -=back - - =head2 JSON and YAML You often hear that JSON is a subset of YAML. This is, however, a mass