Mojo::JSON::Any - Use JSON::XS when it's available (DEPRECATED)
use Mojo::JSON::Any; my $json = Mojo::JSON::Any->new; my $string = $json->encode({foo => [1, 2], bar => 'hello!'}); my $hash = $json->decode('{"foo": [3, -2, 1]}');
This modules is DEPRECATED. See MojoX::JSON::XS
Mojo::JSON::Any is a wrapper over Mojo::JSON and JSON::XS. When the last is available it is used.
Interfaces are identical. Encoding parsing is the same as within Mojo::JSON.
When using JSON::XS is undesirable, even if it is available, set MOJO_JSON environment variable.
MOJO_JSON
See Mojo::JSON.
Mojo::JSON, JSON::XS.
http://github.com/vti/mojo-json-any
In the following cases behavior of Mojo::JSON::Any differs depending on used backend module.
JSON::XS doesn't support blessed references without TO_JSON method, so Mojo::JSON::Any doesn't support them too if JSON::XS is used.
Mojo::JSON::Any doesn't process error messages from backend modules, this is why they differs depending on used backend module.
The module is currently maintained by Yuriy Syrota, ysyrota@cpan.org.
ysyrota@cpan.org
Viacheslav Tykhanovskyi, vti@cpan.org.
vti@cpan.org
Copyright (C) 2010, Viacheslav Tykhanovskyi.
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
To install Mojo::JSON::Any, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojo::JSON::Any
CPAN shell
perl -MCPAN -e shell install Mojo::JSON::Any
For more information on module installation, please visit the detailed CPAN module installation guide.