2::Serializer::JSONMaybeXS;
use Moo;
use JSON::MaybeXS ();
our $VERSION = '0.003';
with 'Dancer2::Core::Role::Serializer';
has '+content_type' => ( default => sub {'application/json;charset=UTF-8'
} );
sub BUILD {
warnings::warnif('deprecated',
'Dancer2::Serializer::JSONMaybeXS is deprecated and should no longer be used');
}
sub serialize {
my ($self, $entity, $options) = @_;
my $confi
tions->{utf8};
JSON::MaybeXS->new($options)->encode($entity);
}
sub deserialize {
my ($self, $entity, $options) = @_;
$options->{utf8} = 1 if !defined $options->{utf8};
JSON::MaybeXS->new($op