Merge branch 'master' of git://github.com/bobtfish/catalyst-action-rest
[catagits/Catalyst-Action-REST.git] / lib / Catalyst / Action / Serialize / JSON.pm
index a681bcf..7423e9e 100644 (file)
@@ -24,7 +24,7 @@ sub execute {
         ) || 'rest';
     my $output;
     eval {
-        $output = $self->encode( $c->stash->{$stash_key} );
+        $output = $self->serialize( $c->stash->{$stash_key} );
     };
     if ($@) {
         return $@;
@@ -33,9 +33,9 @@ sub execute {
     return 1;
 }
 
-sub encode {
+sub serialize {
     my $self = shift;
-    encode_json( @_ );
+    encode_json( shift );
 }
 
 1;