Group
Extension

Matches 2

Valiemon ( P/PO/POKUTUNA/Valiemon-0.05.tar.gz, POKUTUNA, 2020; MetaCPAN )
Valiemon/lib/Valiemon.pm ( view source; MetaCPAN )
_schema;
    };
}


1;

__END__

=encoding utf-8

=head1 NAME

Valiemon - data validator based on json schema

=head1 SYNOPSIS

    use Valiemon;

    # create instance with schema definition
    my $
Valiemon ( P/PO/POKUTUNA/Valiemon-0.05.tar.gz, POKUTUNA, 2020; MetaCPAN )
Valiemon/lib/Valiemon/Primitives.pm ( view source; MetaCPAN )
ref $obj eq '') ? 1 : 0; # really?
}

sub is_number {
    my ($self, $obj) = @_;
    # avoid from JSON::Boolean treated as number.
    (defined $obj && ref $obj eq '' && looks_like_number($obj)) ? 1 :
ub is_boolean {
    my ($self, $obj) = @_;
    return $self->{options}->{use_json_boolean}
        ? $self->is_boolean_json($obj)
        : $self->is_boolean_perl($obj)
}

sub is_boolean_perl { # 1 or
s_like_number($obj) && ($obj == 1 || $obj == 0)) ? 1 : 0; # TODO invalidate 0.0
}

sub is_boolean_json {
    my ($self, $obj) = @_;
    return 1 if defined $obj && Types::Serialiser::is_bool($obj);
  

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.