ThaiSchema::JSON - ThaiSchema meets JSON
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"; }
This module validates JSON string with ThaiSchema's schema object.
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.
To install ThaiSchema, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ThaiSchema
CPAN shell
perl -MCPAN -e shell install ThaiSchema
For more information on module installation, please visit the detailed CPAN module installation guide.