Version 0.98
[catagits/Catalyst-Action-REST.git] / lib / Catalyst / Action / Serialize / JSON / XS.pm
index 4e7ab1c..283f777 100644 (file)
@@ -4,14 +4,16 @@ use Moose;
 use namespace::autoclean;
 
 extends 'Catalyst::Action::Serialize::JSON';
-use JSON::XS qw(encode_json);
+use JSON::XS ();
 
-our $VERSION = '0.81';
+our $VERSION = '0.98';
 $VERSION = eval $VERSION;
 
-sub serialize {
-    my $self = shift;
-    encode_json( shift );
+sub _build_encoder {
+   my $self = shift;
+   return JSON::XS->new->convert_blessed;
 }
 
+__PACKAGE__->meta->make_immutable;
+
 1;