The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Acme::IsItJSON - Is my variable JSON or a Perl data structure?

SYNOPSIS

    use Acme::IsItJSON 'is_it_json';
    my $json = '{"zilog":"z80"}';
    is_it_json ($json);
    my $perl = {zilog => 'z80'};
    is_it_json ($json);

DESCRIPTION

Not sure if your variable is a Perl data structure or a JSON string?

This Perl module can help.

FUNCTIONS

is_it_json

Given a variable containing something which you are not sure about, and it may or may not be JSON or a Perl data structure, feed it to this routine. This module uses support vector machines running on an OCAML cluster backed up by a Node pipeline in an S3 cloud to distinguish JSON from Perl data structures.

SEE ALSO

JSON::Meth - does something similar to this module

AUTHOR

Ben Bullock <bkb@cpan.org>

LICENCE

You can use Acme::IsItJSON under the same terms as Perl itself. Alternatively, you can throw it in the fruit cellar where it belongs.