in reply to Re^2: Type::Tiny and anyOf, oneOf
in thread Type::Tiny and anyOf, oneOf
Something like this:
my $type = Dict->of( foo => Str, baz => Optional[Int], qux => Optional[Str], )->where(q{ exists $_->{baz} or exists $_->{qux} }); if ( $type->check( \%somehash ) ) { say "matched"; }
Also, might be worth looking into JSON-Schema-AsType.
|
|---|