… | |
… | |
84 | |
84 | |
85 | package JSON::XS; |
85 | package JSON::XS; |
86 | |
86 | |
87 | use strict; |
87 | use strict; |
88 | |
88 | |
89 | our $VERSION = '1.52'; |
89 | our $VERSION = '1.53'; |
90 | our @ISA = qw(Exporter); |
90 | our @ISA = qw(Exporter); |
91 | |
91 | |
92 | our @EXPORT = qw(to_json from_json); |
92 | our @EXPORT = qw(to_json from_json); |
93 | |
93 | |
94 | use Exporter; |
94 | use Exporter; |
… | |
… | |
780 | |
780 | |
781 | Undocumented/buggy Unicode handling (how JSON handles Unicode values is |
781 | Undocumented/buggy Unicode handling (how JSON handles Unicode values is |
782 | undocumented. One can get far by feeding it Unicode strings and doing |
782 | undocumented. One can get far by feeding it Unicode strings and doing |
783 | en-/decoding oneself, but Unicode escapes are not working properly). |
783 | en-/decoding oneself, but Unicode escapes are not working properly). |
784 | |
784 | |
785 | No roundtripping (strings get clobbered if they look like numbers, e.g. |
785 | No round-tripping (strings get clobbered if they look like numbers, e.g. |
786 | the string C<2.0> will encode to C<2.0> instead of C<"2.0">, and that will |
786 | the string C<2.0> will encode to C<2.0> instead of C<"2.0">, and that will |
787 | decode into the number 2. |
787 | decode into the number 2. |
788 | |
788 | |
789 | =item JSON::PC 0.01 |
789 | =item JSON::PC 0.01 |
790 | |
790 | |
791 | Very fast. |
791 | Very fast. |
792 | |
792 | |
793 | Undocumented/buggy Unicode handling. |
793 | Undocumented/buggy Unicode handling. |
794 | |
794 | |
795 | No roundtripping. |
795 | No round-tripping. |
796 | |
796 | |
797 | Has problems handling many Perl values (e.g. regex results and other magic |
797 | Has problems handling many Perl values (e.g. regex results and other magic |
798 | values will make it croak). |
798 | values will make it croak). |
799 | |
799 | |
800 | Does not even generate valid JSON (C<{1,2}> gets converted to C<{1:2}> |
800 | Does not even generate valid JSON (C<{1,2}> gets converted to C<{1:2}> |
… | |
… | |
814 | |
814 | |
815 | Completely broken (and confusingly documented) Unicode handling (Unicode |
815 | Completely broken (and confusingly documented) Unicode handling (Unicode |
816 | escapes are not working properly, you need to set ImplicitUnicode to |
816 | escapes are not working properly, you need to set ImplicitUnicode to |
817 | I<different> values on en- and decoding to get symmetric behaviour). |
817 | I<different> values on en- and decoding to get symmetric behaviour). |
818 | |
818 | |
819 | No roundtripping (simple cases work, but this depends on whether the scalar |
819 | No round-tripping (simple cases work, but this depends on whether the scalar |
820 | value was used in a numeric context or not). |
820 | value was used in a numeric context or not). |
821 | |
821 | |
822 | Dumping hashes may skip hash values depending on iterator state. |
822 | Dumping hashes may skip hash values depending on iterator state. |
823 | |
823 | |
824 | Unmaintained (maintainer unresponsive for many months, bugs are not |
824 | Unmaintained (maintainer unresponsive for many months, bugs are not |
… | |
… | |
839 | Undocumented Unicode handling (but the best of the pack. Unicode escapes |
839 | Undocumented Unicode handling (but the best of the pack. Unicode escapes |
840 | still don't get parsed properly). |
840 | still don't get parsed properly). |
841 | |
841 | |
842 | Very inflexible. |
842 | Very inflexible. |
843 | |
843 | |
844 | No roundtripping. |
844 | No round-tripping. |
845 | |
845 | |
846 | Does not generate valid JSON texts (key strings are often unquoted, empty keys |
846 | Does not generate valid JSON texts (key strings are often unquoted, empty keys |
847 | result in nothing being output) |
847 | result in nothing being output) |
848 | |
848 | |
849 | Does not check input for validity. |
849 | Does not check input for validity. |
… | |
… | |
890 | It shows the number of encodes/decodes per second (JSON::XS uses |
890 | It shows the number of encodes/decodes per second (JSON::XS uses |
891 | the functional interface, while JSON::XS/2 uses the OO interface |
891 | the functional interface, while JSON::XS/2 uses the OO interface |
892 | with pretty-printing and hashkey sorting enabled, JSON::XS/3 enables |
892 | with pretty-printing and hashkey sorting enabled, JSON::XS/3 enables |
893 | shrink). Higher is better: |
893 | shrink). Higher is better: |
894 | |
894 | |
895 | Storable | 15779.925 | 14169.946 | |
|
|
896 | -----------+------------+------------+ |
|
|
897 | module | encode | decode | |
895 | module | encode | decode | |
898 | -----------|------------|------------| |
896 | -----------|------------|------------| |
899 | JSON | 4990.842 | 4088.813 | |
897 | JSON | 4990.842 | 4088.813 | |
900 | JSON::DWIW | 51653.990 | 71575.154 | |
898 | JSON::DWIW | 51653.990 | 71575.154 | |
901 | JSON::PC | 65948.176 | 74631.744 | |
899 | JSON::PC | 65948.176 | 74631.744 | |