diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2015-12-13 15:28:57 -0800 |
|---|---|---|
| committer | Mitch Jackson <mitch@freeside.biz> | 2018-10-09 18:35:53 -0400 |
| commit | 79800f746bcbea85297b8ec0a94f19a75ed080d0 (patch) | |
| tree | 48e74122cf56b54b03c1b982dd87964d115c4371 /FS | |
| parent | 828f56957dcd4fb4409eccc8436bf935aa47a8c6 (diff) | |
JSON::XS -> Cpanel::JSON::XS
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/Mason.pm | 3 | ||||
| -rw-r--r-- | FS/FS/Misc/Geo.pm | 2 | ||||
| -rw-r--r-- | FS/FS/UI/Web.pm | 3 | ||||
| -rw-r--r-- | FS/FS/deploy_zone.pm | 2 | ||||
| -rw-r--r-- | FS/FS/part_event/Action/http.pm | 2 | ||||
| -rw-r--r-- | FS/FS/part_export/pbxware.pm | 2 | ||||
| -rw-r--r-- | FS/FS/part_export/thinktel.pm | 12 | ||||
| -rw-r--r-- | FS/FS/part_export/voip_ms.pm | 2 | ||||
| -rw-r--r-- | FS/bin/freeside-cdr-portaone-import | 2 |
9 files changed, 14 insertions, 16 deletions
diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index 5beb100b7..dd9c57a3c 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -77,8 +77,7 @@ if ( -e $addl_handler_use_file ) { use HTML::TableExtract qw(tree); use HTML::FormatText; use HTML::Defang; -# use JSON::XS; ! Maintainers deployed app-breaking defaults, - use Cpanel::JSON::XS; # this is considered safe compatible drop-in replacement + use Cpanel::JSON::XS; # use XMLRPC::Transport::HTTP; # use XMLRPC::Lite; # for XMLRPC::Serializer use MIME::Base64; diff --git a/FS/FS/Misc/Geo.pm b/FS/FS/Misc/Geo.pm index 2050fdf70..8533e37d9 100644 --- a/FS/FS/Misc/Geo.pm +++ b/FS/FS/Misc/Geo.pm @@ -8,7 +8,7 @@ use HTTP::Request; use HTTP::Request::Common qw( GET POST ); use IO::Socket::SSL; use HTML::TokeParser; -use JSON; +use Cpanel::JSON::XS; use URI::Escape 3.31; use Data::Dumper; use FS::Conf; diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index 43a387227..d8117590c 100644 --- a/FS/FS/UI/Web.pm +++ b/FS/FS/UI/Web.pm @@ -739,8 +739,7 @@ use vars qw($DEBUG); use Carp; use Storable qw(nfreeze); use MIME::Base64; -#use JSON::XS; ! maintainers deployed app breaking changes -use Cpanel::JSON::XS; # safe, compatible drop-in replacement +use Cpanel::JSON::XS; use FS::UID qw(getotaker); use FS::Record qw(qsearchs); use FS::queue; diff --git a/FS/FS/deploy_zone.pm b/FS/FS/deploy_zone.pm index 7c3a76ca5..306b4fb44 100644 --- a/FS/FS/deploy_zone.pm +++ b/FS/FS/deploy_zone.pm @@ -6,7 +6,7 @@ use FS::Record qw( qsearch qsearchs dbh ); use Storable qw(thaw); use MIME::Base64; -use Cpanel::JSON::XS qw(encode_json decode_json); +use Cpanel::JSON::XS; use LWP::UserAgent; use HTTP::Request::Common; diff --git a/FS/FS/part_event/Action/http.pm b/FS/FS/part_event/Action/http.pm index 10e9bd463..13d13f292 100644 --- a/FS/FS/part_event/Action/http.pm +++ b/FS/FS/part_event/Action/http.pm @@ -6,7 +6,7 @@ use vars qw( $me ); use IO::Socket::SSL; use LWP::UserAgent; use HTTP::Request::Common; -use JSON::XS; +use Cpanel::JSON::XS; use FS::Misc::DateTime qw( iso8601 ); $me = '[FS::part_event::Action::http]'; diff --git a/FS/FS/part_export/pbxware.pm b/FS/FS/part_export/pbxware.pm index c6fc407e7..e535e6ed0 100644 --- a/FS/FS/part_export/pbxware.pm +++ b/FS/FS/part_export/pbxware.pm @@ -5,7 +5,7 @@ use strict; use Tie::IxHash; use LWP::UserAgent; -use JSON; +use Cpanel::JSON::XS; use HTTP::Request::Common; use Digest::MD5 qw(md5_hex); use FS::Record qw(dbh); diff --git a/FS/FS/part_export/thinktel.pm b/FS/FS/part_export/thinktel.pm index d20852395..67cf2b0da 100644 --- a/FS/FS/part_export/thinktel.pm +++ b/FS/FS/part_export/thinktel.pm @@ -7,7 +7,7 @@ use Tie::IxHash; use URI::Escape; use LWP::UserAgent; use URI::Escape; -use JSON; +use Cpanel::JSON::XS; use FS::Record qw( qsearch qsearchs ); @@ -214,7 +214,7 @@ sub insert_gateway { my $content = { ContactIPAddress => $svc_x->ip_addr, ContactPort => 5060, - IPMatchRequired => JSON::true, + IPMatchRequired => Cpanel::JSON::XS::true, SipDomainName => $self->option('proxy'), SipTrunkType => $self->option('trunktype'), SipUsername => $trunknum, @@ -270,7 +270,7 @@ sub insert_trunk { my $endpoint = "SipTrunks"; my $content = { Account => $self->option('username'), - Enabled => JSON::true, + Enabled => Cpanel::JSON::XS::true, Label => $svc_x->phone_name_or_cust, Locale => $locales{$self->option('locale')}, MaxChannels => $svc_x->max_simultaneous, @@ -325,7 +325,7 @@ sub replace_trunk { my $self = FS::part_export->by_key($exportnum); my $svc_x = FS::svc_phone->by_key($svcnum); - my $enabled = JSON::is_bool( $self->cust_svc->cust_pkg->susp == 0 ); + my $enabled = Cpanel::JSON::XS::is_bool( $self->cust_svc->cust_pkg->susp == 0 ); my $phonenum = $svc_x->phonenum; my $endpoint = "SipTrunks/$phonenum"; @@ -398,7 +398,7 @@ sub replace_gateway { ContactIPAddress => $svc_x->ip_addr, ContactPort => 5060, ID => $binding_id, - IPMatchRequired => JSON::true, + IPMatchRequired => Cpanel::JSON::XS::true, Name => $binding_name, SipDomainName => $self->option('proxy'), SipTrunkType => $self->option('trunktype'), @@ -606,7 +606,7 @@ have a 'Message' element. sub api_request { my $self = shift; my ($method, $endpoint, $content) = @_; - my $json = JSON->new->canonical(1); # hash keys are ordered + my $json = Cpanel::JSON::XS->new->canonical(1); # hash keys are ordered $DEBUG ||= 1 if $self->option('debug'); diff --git a/FS/FS/part_export/voip_ms.pm b/FS/FS/part_export/voip_ms.pm index a23345c5a..251988485 100644 --- a/FS/FS/part_export/voip_ms.pm +++ b/FS/FS/part_export/voip_ms.pm @@ -7,7 +7,7 @@ use Tie::IxHash; use LWP::UserAgent; use URI; use URI::Escape; -use JSON; +use Cpanel::JSON::XS; use HTTP::Request::Common; use Cache::FileCache; use FS::Record qw(dbh); diff --git a/FS/bin/freeside-cdr-portaone-import b/FS/bin/freeside-cdr-portaone-import index 855f68fdd..dfd130bbb 100644 --- a/FS/bin/freeside-cdr-portaone-import +++ b/FS/bin/freeside-cdr-portaone-import @@ -5,7 +5,7 @@ use strict; use Date::Format 'time2str'; use Date::Parse 'str2time'; use Getopt::Long; -use JSON; +use Cpanel::JSON::XS; use Net::HTTPS::Any qw(https_post); use Time::Local; |
