Created
January 2, 2016 11:31
-
-
Save astj/c9a621574595dae78a14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Valiemon; | |
use Data::Dumper; | |
use JSON::XS qw(decode_json); | |
my $content = do { | |
local $/; | |
open my $fh, '<', './v4-schema.json'; | |
<$fh>; | |
}; | |
my $data = decode_json($content); | |
my $valiemon = Valiemon->new($data); | |
my ($res, $error) = $valiemon->validate($data); | |
if (!$res) { | |
warn 'FAILED!'; | |
warn Dumper $error; | |
} else { | |
warn 'SUCCESS!'; | |
} | |
exit; | |
__END__ | |
$ carton exec -- perl -Ilib sketch/schemavalidator.pl | |
This package support only single scope and `#/` referencing at lib/Valiemon/Attributes/Properties.pm line 29. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment