diff --git a/opac/svc/report b/opac/svc/report index 1ded9c94b0..0b17a4de72 100755 --- a/opac/svc/report +++ b/opac/svc/report @@ -24,7 +24,7 @@ use Modern::Perl; use C4::Reports::Guided; -use JSON; +use JSON::XS; use CGI; use Koha::Cache; @@ -70,7 +70,7 @@ unless ($json_text) { else { $lines = $sth->fetchall_arrayref; } - $json_text = to_json($lines); + $json_text = encode_json($lines); if ($cache_active) { $cache->set_in_cache( $cache_key, $json_text, @@ -78,7 +78,7 @@ unless ($json_text) { } } else { - $json_text = to_json($errors); + $json_text = encode_json($errors); } }