JSON-XS
view release on metacpan or search on metacpan
$x *= 1; # same thing, the choice is yours.
You can not currently force the type in other, less obscure, ways.
Tell me if you need this capability (but don't forget to explain why
it's needed :).
Note that numerical precision has the same meaning as under Perl (so
binary to decimal conversion follows the same rules as in Perl,
which can differ to other languages). Also, your perl interpreter
might expose extensions to the floating point numbers of your
platform, such as infinities or NaN's - these cannot be represented
in JSON, and it is an error to pass those in.
OBJECT SERIALISATION
As JSON cannot directly represent Perl objects, you have to choose
between a pure JSON representation (without the ability to deserialise
the object automatically again), and a nonstandard extension to the JSON
syntax, tagged values.
SERIALISATION
What happens when "JSON::XS" encounters a Perl object depends on the
$x *= 1; # same thing, the choice is yours.
You can not currently force the type in other, less obscure, ways. Tell me
if you need this capability (but don't forget to explain why it's needed
:).
Note that numerical precision has the same meaning as under Perl (so
binary to decimal conversion follows the same rules as in Perl, which
can differ to other languages). Also, your perl interpreter might expose
extensions to the floating point numbers of your platform, such as
infinities or NaN's - these cannot be represented in JSON, and it is an
error to pass those in.
=back
=head2 OBJECT SERIALISATION
As JSON cannot directly represent Perl objects, you have to choose between
a pure JSON representation (without the ability to deserialise the object
automatically again), and a nonstandard extension to the JSON syntax,
tagged values.
( run in 0.380 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )