NAME

Mojo::JSON::Any - Use JSON::XS when it's available (DEPRECATED)

SYNOPSIS

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]}');

DESCRIPTION

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.

ATTRIBUTES

See Mojo::JSON.

METHODS

See Mojo::JSON.

SEE ALSO

Mojo::JSON, JSON::XS.

DEVELOPMENT

Repository

http://github.com/vti/mojo-json-any

BUGS AND LIMITATIONS

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.

AUTHOR

The module is currently maintained by Yuriy Syrota, ysyrota@cpan.org.

AUTHOR EMERITUS

Viacheslav Tykhanovskyi, vti@cpan.org.

COPYRIGHT AND LICENSE

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.