JSON::Schema::Validate; use JSON (); my $schema = JSON->new->decode( do { local $/; <DATA>; } ); my $js = JSON::Schema::Validate->new( $schema ) ->compile;