The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Kelp::Module::JSON::XS - DEPRECATED JSON:XS module for Kelp applications

DEPRECATED

*** This module is now deprecated. ***

Kelp is now using JSON::MaybeXS, which will automatically choose the most fitting backend for JSON.

Kelp used JSON module before that. 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

SYNOPSIS

package MyApp;
use Kelp::Base 'Kelp';

sub some_route {
    my $self = shift;
    return $self->json->encode( { success => \1 } );
}

REGISTERED METHODS

This module registers only one method into the application: json.

CONFIGURATION

In 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
        }
    }
}

AUTHOR

Stefan Geneshky minimal@cpan.org

LICENCE

Perl