Group
Extension

Matches 4

Avro ( R/RS/RSKRABA/Avro-1.12.1.tar.gz, RSKRABA, 2025; MetaCPAN )
Avro/lib/Avro/Schema.pm ( view source; MetaCPAN )

use Carp;
use JSON::MaybeXS ();
use Try::Tiny;

our $VERSION = '++MODULE_VERSION++';

my $json = JSON::MaybeXS->new->allow_nonref;

sub parse {
    my $schema      = shift;
    my $json_string = shif
 || "";

    my $struct = try {
        $json->decode($json_string);
    }
    catch {
        throw Avro::Schema::Error::Parse(
            "Cannot parse json string: $_"
        );
    };
    return

    return $json->encode($struct);
}

sub parse_struct {
    my $schema = shift;
    my $struct = shift;
    my $names = shift || {};
    my $namespace = shift || "";

    ## 1.3.2 A JSON object
    
Avro ( R/RS/RSKRABA/Avro-1.12.1.tar.gz, RSKRABA, 2025; MetaCPAN )
Avro/lib/Avro/DataFileReader.pm ( view source; MetaCPAN )
$datafile->{_writer_schema}) {
        my $json_schema = $datafile->metadata->{'avro.schema'};
        $datafile->{_writer_schema} = Avro::Schema->parse($json_schema);
    }
    return $datafile->{_wr
Avro ( R/RS/RSKRABA/Avro-1.12.1.tar.gz, RSKRABA, 2025; MetaCPAN )
Avro/lib/Avro/Protocol.pm ( view source; MetaCPAN )
imitations
# under the License.

package Avro::Protocol;
use strict;
use warnings;

use Carp;
use JSON::MaybeXS ();
use Try::Tiny;
use Avro::Protocol::Message;
use Avro::Schema;
use Error;
use Object:
ame
    namespace
    doc
    types
    messages
};

our $VERSION = '++MODULE_VERSION++';

my $json = JSON::MaybeXS->new->allow_nonref;

sub parse {
    my $class     = shift;
    my $enc_proto = shif
mpty");

    my $struct = try {
        $json->decode($enc_proto);
    }
    catch {
        throw Avro::Protocol::Error::Parse(
            "Cannot parse json string: $_"
        );
    };
    return
Avro ( R/RS/RSKRABA/Avro-1.12.1.tar.gz, RSKRABA, 2025; MetaCPAN )
Avro/lib/Avro/BinaryEncoder.pm ( view source; MetaCPAN )
t;
use warnings;

use Config;
use Encode();
use Error::Simple;
use Regexp::Common qw(number);
use JSON::PP; # For is_bool

our $VERSION = '++MODULE_VERSION++';

# Private function deleted below, shoul
BinaryEncoder::Error("cannot encode a '$type' reference as boolean")
            unless $type eq 'JSON::PP::Boolean';
    }
    else {
        throw Avro::BinaryEncoder::Error( "'$data' is not a valid
")
            unless $data eq '' # For Perl versions without builtin::is_bool
                || JSON::PP::is_bool($data)
                || $data =~ /^(?:true|t|false|f|yes|y|no|n|0|1)$/i;
    }

  

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