diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2015-12-10 21:24:57 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2016-01-22 16:58:04 +0000 |
commit | 1c40be1f4b5a00fd6da081225b04efad228f8025 (patch) | |
tree | ec6e320f4d44c1a06deddfbd43050e2e04a6499b /perllib/FixMyStreet/App/Controller/Report.pm | |
parent | 61573768a8bd0a9f6c3ec69d405f153121e07563 (diff) |
Switch to JSON::MaybeXS, remove JSON::XS.
Travis has Cpanel::JSON::XS preinstalled, which means that the build
would fail there, as JSON::MaybeXS would try and upgrade JSON::XS to
version 3 which the snapshot did not contain.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm index d7cae05d4..5cc44bb8f 100644 --- a/perllib/FixMyStreet/App/Controller/Report.pm +++ b/perllib/FixMyStreet/App/Controller/Report.pm @@ -2,6 +2,8 @@ package FixMyStreet::App::Controller::Report; use Moose; use namespace::autoclean; +use JSON::MaybeXS; + BEGIN { extends 'Catalyst::Controller'; } =head1 NAME @@ -184,7 +186,7 @@ sub format_problem_for_display : Private { if ( $c->stash->{ajax} ) { $c->res->content_type('application/json; charset=utf-8'); - my $content = JSON->new->utf8(1)->encode( + my $content = encode_json( { report => $c->cobrand->problem_as_hashref( $problem, $c ), updates => $c->cobrand->updates_as_hashref( $problem, $c ), |