MATSUNO★Tokuhiro > ThaiSchema-0.04 > ThaiSchema::JSON

Download:
ThaiSchema-0.04.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source   Latest Release: ThaiSchema-0.09

NAME ^

ThaiSchema::JSON - ThaiSchema meets JSON

SYNOPSIS ^

    use ThaiSchema::JSON;
    use ThaiSchema;

    my $schema = type_array();
    my $j = ThaiSchema::JSON->new();
    my ($ok, $errors) = $j->validate('[]', $schema);
    print $ok ? "ok\n" : "not ok\n";
    for (@$errors) {
        print "$_\n";
    }

DESCRIPTION ^

This module validates JSON string with ThaiSchema's schema object.

THANKS TO ^

This module is based on JSON::Tiny's code. Thanks to David Oswald. And JSON::Tiny is based on Mojo::JSON. Thanks to Mojolicious development team.

syntax highlighting: