From: Karen Etheridge Date: Wed, 5 Dec 2018 17:41:55 +0000 (-0800) Subject: JSON.pm -> JSON::MaybeXS X-Git-Tag: v1.59_01~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b39d4d3a3d552af9498fc22a93d54b4455685ba2;p=dbsrgits%2FSQL-Translator.git JSON.pm -> JSON::MaybeXS --- diff --git a/Changes b/Changes index 7ccb06f..e70308f 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Changes for SQL::Translator * Add support for parsing PostgreSQL dollar-quoted strings + * switched JSON backend from JSON.pm to JSON::MaybeXS 0.11024 2018-01-09 diff --git a/Makefile.PL b/Makefile.PL index aaa0f3b..9cc1156 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -31,7 +31,7 @@ my $deps = { 'XML::LibXML' => '1.69', }, test_requires => { - 'JSON' => '2.0', + 'JSON::MaybeXS' => '1.003003', 'YAML' => '0.66', 'XML::Writer' => '0.500', 'Test::More' => '0.88', diff --git a/lib/SQL/Translator/Parser/JSON.pm b/lib/SQL/Translator/Parser/JSON.pm index 22742ad..b2e7ab6 100644 --- a/lib/SQL/Translator/Parser/JSON.pm +++ b/lib/SQL/Translator/Parser/JSON.pm @@ -7,7 +7,7 @@ our $VERSION = '1.00'; use SQL::Translator::Schema; use SQL::Translator::Utils qw(header_comment); use Data::Dumper; -use JSON; +use JSON::MaybeXS 'from_json'; sub parse { my ($translator, $data) = @_; diff --git a/lib/SQL/Translator/Producer/JSON.pm b/lib/SQL/Translator/Producer/JSON.pm index b2f9004..0ff6324 100644 --- a/lib/SQL/Translator/Producer/JSON.pm +++ b/lib/SQL/Translator/Producer/JSON.pm @@ -20,7 +20,7 @@ use strict; use warnings; our $VERSION = '1.00'; -use JSON; +use JSON::MaybeXS 'to_json'; sub produce { my $translator = shift; @@ -184,7 +184,7 @@ sub view_index { =head1 SEE ALSO -SQL::Translator, JSON, http://www.json.org/. +SQL::Translator, JSON::MaybeXS, http://www.json.org/. =head1 AUTHORS diff --git a/t/23json.t b/t/23json.t index 7ed847e..431ce4d 100644 --- a/t/23json.t +++ b/t/23json.t @@ -15,7 +15,7 @@ BEGIN { } my $sqlt_version = $SQL::Translator::VERSION; -use JSON; +use JSON::MaybeXS 'from_json'; my $json = from_json(<