Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVRO-3998: Switch Perl library from JSON::XS to JSON::MaybeXS #2952

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The following packages must be installed before Avro can be built:
- Ruby: Ruby 2.7 or greater, ruby-dev, gem, bundler, snappy
- Perl: Perl 5.24.1 or greater, gmake, Module::Install,
Module::Install::ReadmeFromPod, Module::Install::Repository,
Math::BigInt, JSON::XS, Try::Tiny, Regexp::Common, Encode,
Math::BigInt, JSON::MaybeXS, Try::Tiny, Regexp::Common, Encode,
IO::String, Object::Tiny, Compress::ZLib, Error::Simple,
Test::More, Test::Exception, Test::Pod
- Rust: rustc and Cargo 1.65.0 or greater
Expand Down
3 changes: 3 additions & 0 deletions lang/perl/Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Revision history for Perl extension Avro

- Switch from JSON::XS to JSON::MaybeXS to support
multiple JSON backends

1.00 Fri Jan 17 15:00:00 2014
- Relicense under apache license 2.0

Expand Down
2 changes: 1 addition & 1 deletion lang/perl/Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ requires 'Compress::Zstd';
requires 'Encode';
requires 'Error::Simple';
requires 'IO::String';
requires 'JSON::XS';
requires 'JSON::MaybeXS';
requires 'Object::Tiny';
requires 'Regexp::Common';
requires 'Try::Tiny';
Expand Down
4 changes: 2 additions & 2 deletions lang/perl/bin/avro-to-json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ use warnings;
use Avro::DataFileReader;
use Carp;
use IO::File;
use JSON::XS;
use JSON::MaybeXS ();

my $j = JSON::XS->new->allow_nonref;
my $j = JSON::MaybeXS->new->allow_nonref;

my $fh = IO::File->new(shift || croak "specify a file");
my $reader = Avro::DataFileReader->new(
Expand Down
4 changes: 2 additions & 2 deletions lang/perl/lib/Avro/Protocol.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use strict;
use warnings;

use Carp;
use JSON::XS();
use JSON::MaybeXS ();
use Try::Tiny;
use Avro::Protocol::Message;
use Avro::Schema;
Expand All @@ -35,7 +35,7 @@ use Object::Tiny qw{

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

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

sub parse {
my $class = shift;
Expand Down
4 changes: 2 additions & 2 deletions lang/perl/lib/Avro/Schema.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ use strict;
use warnings;

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

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

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

sub parse {
my $schema = shift;
Expand Down
Loading