aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/FakeMapit.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-01-27 10:34:55 +0000
committerMatthew Somerville <matthew@mysociety.org>2016-01-27 10:34:55 +0000
commitb8083a462aebf542f6f39c4201e1f09248b7e0e7 (patch)
treeab44be742664db2dd720efc03326db0acef22dde /perllib/FixMyStreet/App/Controller/FakeMapit.pm
parentac59f93b2228f5ff77ca7b7aff6fc3be54d360cd (diff)
parent5adabce92647a6b9e12887af7959efcfef4877d4 (diff)
Merge branch '1146-social-login'
Conflicts: templates/web/base/report/new/fill_in_details_form.html templates/web/base/report/update-form.html
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/FakeMapit.pm')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/FakeMapit.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/FakeMapit.pm b/perllib/FixMyStreet/App/Controller/FakeMapit.pm
index 253c75ba4..a4adadd09 100755
--- a/perllib/FixMyStreet/App/Controller/FakeMapit.pm
+++ b/perllib/FixMyStreet/App/Controller/FakeMapit.pm
@@ -1,6 +1,7 @@
package FixMyStreet::App::Controller::FakeMapit;
use Moose;
use namespace::autoclean;
+use JSON::MaybeXS;
BEGIN { extends 'Catalyst::Controller'; }
@@ -22,7 +23,7 @@ my $area = { "name" => "Everywhere", "type" => "ZZZ", "id" => 161 };
sub output : Private {
my ( $self, $c, $data ) = @_;
- my $body = JSON->new->utf8(1)->encode( $data );
+ my $body = encode_json($data);
$c->res->content_type('application/json; charset=utf-8');
$c->res->body( $body );
}