--- JSON-XS/XS.pm 2007/03/25 00:47:42 1.20 +++ JSON-XS/XS.pm 2007/03/25 02:32:40 1.21 @@ -11,6 +11,9 @@ $utf8_encoded_json_text = to_json $perl_hash_or_arrayref; $perl_hash_or_arrayref = from_json $utf8_encoded_json_text; + # objToJson and jsonToObj are exported for JSON + # compatibility, but should not be used in new code. + # oo-interface $coder = JSON::XS->new->ascii->pretty->allow_nonref; @@ -38,7 +41,7 @@ =over 4 -=item * correct handling of unicode issues +=item * correct unicode handling This module knows how to handle Unicode, and even documents how and when it does so. @@ -47,7 +50,8 @@ When you serialise a perl data structure using only datatypes supported by JSON, the deserialised data structure is identical on the Perl level. -(e.g. the string "2.0" doesn't suddenly become "2"). +(e.g. the string "2.0" doesn't suddenly become "2" just because it looks +like a number). =item * strict checking of JSON correctness @@ -68,10 +72,10 @@ =item * reasonably versatile output formats You can choose between the most compact guarenteed single-line format -possible (nice for simple line-based protocols), a pure-ascii format (for -when your transport is not 8-bit clean), or a pretty-printed format (for -when you want to read that stuff). Or you can combine those features in -whatever way you like. +possible (nice for simple line-based protocols), a pure-ascii format +(for when your transport is not 8-bit clean, still supports the whole +unicode range), or a pretty-printed format (for when you want to read that +stuff). Or you can combine those features in whatever way you like. =back @@ -82,10 +86,10 @@ use strict; BEGIN { - our $VERSION = '0.7'; + our $VERSION = '0.8'; our @ISA = qw(Exporter); - our @EXPORT = qw(to_json from_json); + our @EXPORT = qw(to_json from_json objToJson jsonToObj); require Exporter; require XSLoader;