… | |
… | |
59 | =cut |
59 | =cut |
60 | |
60 | |
61 | package JSON::XS; |
61 | package JSON::XS; |
62 | |
62 | |
63 | BEGIN { |
63 | BEGIN { |
64 | $VERSION = '0.1'; |
64 | $VERSION = '0.2'; |
65 | @ISA = qw(Exporter); |
65 | @ISA = qw(Exporter); |
66 | |
66 | |
67 | @EXPORT = qw(to_json from_json); |
67 | @EXPORT = qw(to_json from_json); |
68 | require Exporter; |
68 | require Exporter; |
69 | |
69 | |
… | |
… | |
247 | followed by some benchmark values. JSON::XS was designed not to suffer |
247 | followed by some benchmark values. JSON::XS was designed not to suffer |
248 | from any of these problems or limitations. |
248 | from any of these problems or limitations. |
249 | |
249 | |
250 | =over 4 |
250 | =over 4 |
251 | |
251 | |
252 | =item JSON |
252 | =item JSON 1.07 |
253 | |
253 | |
254 | Slow (but very portable, as it is written in pure Perl). |
254 | Slow (but very portable, as it is written in pure Perl). |
255 | |
255 | |
256 | Undocumented/buggy Unicode handling (how JSON handles unicode values is |
256 | Undocumented/buggy Unicode handling (how JSON handles unicode values is |
257 | undocumented. One can get far by feeding it unicode strings and doing |
257 | undocumented. One can get far by feeding it unicode strings and doing |
… | |
… | |
259 | |
259 | |
260 | No roundtripping (strings get clobbered if they look like numbers, e.g. |
260 | No roundtripping (strings get clobbered if they look like numbers, e.g. |
261 | the string C<2.0> will encode to C<2.0> instead of C<"2.0">, and that will |
261 | the string C<2.0> will encode to C<2.0> instead of C<"2.0">, and that will |
262 | decode into the number 2. |
262 | decode into the number 2. |
263 | |
263 | |
264 | =item JSON::PC |
264 | =item JSON::PC 0.01 |
265 | |
265 | |
266 | Very fast. |
266 | Very fast. |
267 | |
267 | |
268 | Undocumented/buggy Unicode handling. |
268 | Undocumented/buggy Unicode handling. |
269 | |
269 | |
… | |
… | |
276 | which is not a valid JSON string. |
276 | which is not a valid JSON string. |
277 | |
277 | |
278 | Unmaintained (maintainer unresponsive for many months, bugs are not |
278 | Unmaintained (maintainer unresponsive for many months, bugs are not |
279 | getting fixed). |
279 | getting fixed). |
280 | |
280 | |
281 | =item JSON::Syck |
281 | =item JSON::Syck 0.21 |
282 | |
282 | |
283 | Very buggy (often crashes). |
283 | Very buggy (often crashes). |
284 | |
284 | |
285 | Very inflexible (no human-readable format supported, format pretty much |
285 | Very inflexible (no human-readable format supported, format pretty much |
286 | undocumented. I need at least a format for easy reading by humans and a |
286 | undocumented. I need at least a format for easy reading by humans and a |
… | |
… | |
305 | JSON. One bank might parse a given non-JSON request and deduct money, |
305 | JSON. One bank might parse a given non-JSON request and deduct money, |
306 | while the other might reject the transaction with a syntax error. While a |
306 | while the other might reject the transaction with a syntax error. While a |
307 | good protocol will at least recover, that is extra unnecessary work and |
307 | good protocol will at least recover, that is extra unnecessary work and |
308 | the transaction will still not succeed). |
308 | the transaction will still not succeed). |
309 | |
309 | |
310 | =item JSON::DWIW |
310 | =item JSON::DWIW 0.04 |
311 | |
311 | |
312 | Very fast. Very natural. Very nice. |
312 | Very fast. Very natural. Very nice. |
313 | |
313 | |
314 | Undocumented unicode handling (but the best of the pack. Unicode escapes |
314 | Undocumented unicode handling (but the best of the pack. Unicode escapes |
315 | still don't get parsed properly). |
315 | still don't get parsed properly). |