X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstemmaweb%2FView%2FJSON.pm;h=347c034e4248ad0eaa59c7d30b0c8c7895622757;hb=487674b92f431087bfd5cd66cffd35fcfc705548;hp=e8a9284e3683b17bf09a7e1407ccc1221c48b6b4;hpb=b8a92065e99b57b3e6bdd274e7bad4bf00c28952;p=scpubgit%2Fstemmaweb.git diff --git a/lib/stemmaweb/View/JSON.pm b/lib/stemmaweb/View/JSON.pm index e8a9284..347c034 100644 --- a/lib/stemmaweb/View/JSON.pm +++ b/lib/stemmaweb/View/JSON.pm @@ -3,6 +3,16 @@ package stemmaweb::View::JSON; use strict; use base 'Catalyst::View::JSON'; +use JSON::XS (); + +sub encode_json { + my( $self, $c, $data ) = @_; + my $json = JSON::XS->new->utf8->convert_blessed(1); + $json->encode( $data ); +} + +1; + =head1 NAME stemmaweb::View::JSON - Catalyst JSON View @@ -23,7 +33,3 @@ Tara Andrews This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. - -=cut - -1;