From cd8179cc8917658dd05ea4e542a531f5ccdc75ce Mon Sep 17 00:00:00 2001 From: franck cuny Date: Thu, 14 Oct 2010 14:06:03 +0200 Subject: use utf8 --- lib/Net/HTTP/Spore/Middleware/Format/JSON.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Net/HTTP/Spore/Middleware/Format/JSON.pm b/lib/Net/HTTP/Spore/Middleware/Format/JSON.pm index 3fe54de..361ae3f 100644 --- a/lib/Net/HTTP/Spore/Middleware/Format/JSON.pm +++ b/lib/Net/HTTP/Spore/Middleware/Format/JSON.pm @@ -10,13 +10,13 @@ has _json_parser => ( is => 'rw', isa => 'JSON', lazy => 1, - default => sub { JSON->new->allow_nonref }, + default => sub { JSON->new->utf8(1)->allow_nonref }, ); sub encode { $_[0]->_json_parser->encode( $_[1] ); } sub decode { $_[0]->_json_parser->decode( $_[1] ); } sub accept_type { ( 'Accept' => 'application/json' ) } -sub content_type { ( 'Content-Type' => 'application/json' ) } +sub content_type { ( 'Content-Type' => 'application/json;' ) } 1; -- cgit v1.2.3