Commit | Line | Data |
b8a92065 |
1 | package stemmaweb::View::JSON; |
2 | |
3 | use strict; |
4 | use base 'Catalyst::View::JSON'; |
5 | |
5f15640c |
6 | use JSON::XS (); |
7 | |
8 | sub encode_json { |
9 | my( $self, $c, $data ) = @_; |
10 | my $json = JSON::XS->new->utf8->convert_blessed(1); |
11 | $json->encode( $data ); |
12 | } |
13 | |
14 | 1; |
15 | |
b8a92065 |
16 | =head1 NAME |
17 | |
18 | stemmaweb::View::JSON - Catalyst JSON View |
19 | |
20 | =head1 SYNOPSIS |
21 | |
22 | See L<stemmaweb> |
23 | |
24 | =head1 DESCRIPTION |
25 | |
26 | Catalyst JSON View. |
27 | |
28 | =head1 AUTHOR |
29 | |
30 | Tara Andrews |
31 | |
32 | =head1 LICENSE |
33 | |
34 | This library is free software, you can redistribute it and/or modify |
35 | it under the same terms as Perl itself. |