ckage Web::Request::Role::JSON;
# ABSTRACT: Make handling JSON easier in Web::Request
our $VERSION = '1.008'; # VERSION
use 5.010;
use MooseX::Role::Parameterized;
use JSON::MaybeXS;
use Encode;
p
ired => 0,
default => 'application/json; charset=utf-8',
);
role {
my $p = shift;
my $content_type = $p->content_type;
method json_payload => sub {
my $self = shi
encoding, which is utf8 for JSON. So $content has UTF8 flag
# on, which means we have to tell JSON::MaybeXS to turn
# utf8-handling OFF
return JSON::MaybeXS->new( utf8 => 0 )-