Kelp::Module::JSON::XS - JSON:XS module for Kelp applications
*** This module is now deprecated. *** Beginning with version 2.0 of the JSON module, when both JSON and JSON::XS are installed, then JSON will fall back on JSON::XS
package MyApp; use Kelp::Base 'Kelp'; sub some_route { my $self = shift; return $self->json->encode( { success => \1 } ); }
This module registers only one method into the application: json.
json
In conf/config.pl:
conf/config.pl
{ modules => ['JSON:XS'], # And whatever else you need modules_init => { 'JSON::XS' => { pretty => 1, allow_blessed => 1 # And whetever else you want } } }
Stefan Geneshky minimal@cpan.org
Perl
To install Kelp::Module::JSON::XS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Kelp::Module::JSON::XS
CPAN shell
perl -MCPAN -e shell install Kelp::Module::JSON::XS
For more information on module installation, please visit the detailed CPAN module installation guide.