aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-02-05 23:36:19 +0000
committerMatthew Somerville <matthew@mysociety.org>2016-02-09 14:21:51 +0000
commitb029f3d084b0dbd4136f7fd48d2e222edc683b6f (patch)
treebb565e639e3a792e9412a22e8e02caf424d491b7 /perllib/FixMyStreet/App
parentcf80773fa925f36a7c43b5f7eb1bcf7f56593796 (diff)
Switch final few JSON uses to JSON::MaybeXS.
Diffstat (limited to 'perllib/FixMyStreet/App')
-rw-r--r--perllib/FixMyStreet/App/Controller/Photo.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm
index df4cab2d8..bfb1c5535 100644
--- a/perllib/FixMyStreet/App/Controller/Photo.pm
+++ b/perllib/FixMyStreet/App/Controller/Photo.pm
@@ -4,7 +4,7 @@ use namespace::autoclean;
BEGIN {extends 'Catalyst::Controller'; }
-use JSON;
+use JSON::MaybeXS;
use File::Path;
use File::Slurp;
use FixMyStreet::App::Model::PhotoSet;
@@ -112,9 +112,8 @@ sub upload : Local {
$out = { id => $fileid };
}
- my $body = JSON->new->utf8(1)->encode($out);
$c->res->content_type('application/json; charset=utf-8');
- $c->res->body($body);
+ $c->res->body(encode_json($out));
}
=head2 process_photo