package Sledge::Plugin::JSON::XS;
use strict;
use warnings;
use 5.00800;
use JSON::XS;
use Encode ();
our $VERSION = '0.05';
our $ConformToRFC4627 = 0;
our $ENCODING = 'utf-8';
sub import {
my $
pkg = caller(0);
no strict 'refs'; ## no critic.
*{"$pkg\::output_json_xs"} = \&_output_json_xs;
}
sub _output_json_xs {
my ($self, $src) = @_;
my $content_type =
( $self->d
e($self, $ENCODING );
my $json = encode_json($src);
my $output = _add_callback($self, _validate_callback_param($self, ($self->r->param('callback') || '')), $json );
$self->r->content_type