From fac5e706dfa0e8f7a6f92de50d00cddf23eb2b2c Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Tue, 28 Aug 2018 11:54:31 -0500 Subject: [PATCH 1/2] Sorting and line breaks for the download counts --- lib/App/KSP_CKAN/DownloadCounts.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/App/KSP_CKAN/DownloadCounts.pm b/lib/App/KSP_CKAN/DownloadCounts.pm index b83d59e..ce5b56c 100644 --- a/lib/App/KSP_CKAN/DownloadCounts.pm +++ b/lib/App/KSP_CKAN/DownloadCounts.pm @@ -10,7 +10,7 @@ use File::chdir; use File::Slurper qw(read_text write_text); use File::Basename qw(basename); use Try::Tiny; -use JSON; +use JSON::PP; use File::Path qw(mkpath); use App::KSP_CKAN::Tools::Git; use Moo; @@ -57,7 +57,12 @@ method _build__http { } method _build__json { - return JSON->new->allow_blessed(1)->convert_blessed(1); + return JSON::PP->new + ->indent(1) + ->indent_length(0) + ->canonical(1) + ->allow_blessed(1) + ->convert_blessed(1); } method _build__NetKAN { From 51dfe4115a0853e10162b643971ba970e297799d Mon Sep 17 00:00:00 2001 From: HebaruSan Date: Wed, 29 Aug 2018 01:20:28 -0500 Subject: [PATCH 2/2] Back to regular JSON object --- lib/App/KSP_CKAN/DownloadCounts.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/App/KSP_CKAN/DownloadCounts.pm b/lib/App/KSP_CKAN/DownloadCounts.pm index ce5b56c..4e2480f 100644 --- a/lib/App/KSP_CKAN/DownloadCounts.pm +++ b/lib/App/KSP_CKAN/DownloadCounts.pm @@ -10,7 +10,7 @@ use File::chdir; use File::Slurper qw(read_text write_text); use File::Basename qw(basename); use Try::Tiny; -use JSON::PP; +use JSON; use File::Path qw(mkpath); use App::KSP_CKAN::Tools::Git; use Moo; @@ -57,9 +57,8 @@ method _build__http { } method _build__json { - return JSON::PP->new + return JSON->new ->indent(1) - ->indent_length(0) ->canonical(1) ->allow_blessed(1) ->convert_blessed(1);