5.006;
package Template::Plugin::JSON; # git description: v0.07-6-g80fc733
# ABSTRACT: Adds a .json vmethod for all TT values.
use Moose;
use JSON::MaybeXS 'JSON';
use Carp qw/croak/;
extends qw
(
isa => "Object",
is => "ro",
weak_ref => 1,
);
has json_converter => (
isa => "Object",
is => "ro",
lazy_build => 1,
);
has json_args => (
isa => "HashRef",
is => "ro",
default => sub
JSON::PP/Cpanel::JSON::XS now";
}
$args = ref $args[0] ? $args[0] : {};
return { %$args, context => $c, json_args => $args };
}
sub _build_json_converter {
my $self = shift;
my $json = JSON(