diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-04-17 20:44:39 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-04-17 20:44:39 -0700 |
commit | 04bf3e2423b070d3e3e2a2e6006b678bcf11b481 (patch) | |
tree | df34ab7f8a9a14305a2b2b6124035f680cc559ef /FS | |
parent | 9fbee73725ce02023c76179d573048cf4177903b (diff) |
move from legacy compat JSON to_json to modern JSON::XS encode_json, RT#22630
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Mason.pm | 2 | ||||
-rw-r--r-- | FS/FS/UI/Web.pm | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index d277c28..1553a42 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -77,7 +77,7 @@ if ( -e $addl_handler_use_file ) { use HTML::TableExtract qw(tree); use HTML::FormatText; use HTML::Defang; - use JSON; + use JSON::XS; # use XMLRPC::Transport::HTTP; # use XMLRPC::Lite; # for XMLRPC::Serializer use MIME::Base64; diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index 3fd61ef..c8ad430 100644 --- a/FS/FS/UI/Web.pm +++ b/FS/FS/UI/Web.pm @@ -581,7 +581,7 @@ use vars qw($DEBUG); use Carp; use Storable qw(nfreeze); use MIME::Base64; -use JSON; +use JSON::XS; use FS::UID qw(getotaker); use FS::Record qw(qsearchs); use FS::queue; @@ -726,10 +726,7 @@ sub job_status { @return = ( 'error', $job ? $job->statustext : $jobnum ); } - #to_json(\@return); #waiting on deb 5.0 for new JSON.pm? - #silence the warning though - my $to_json = JSON->can('to_json') || JSON->can('objToJson'); - &$to_json(\@return); + encode_json \@return; } |