line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
3
|
1
|
|
|
1
|
|
88572
|
use JSON qw(); |
|
1
|
|
|
|
|
159848
|
|
|
1
|
|
|
|
|
7
|
|
4
|
1
|
|
|
1
|
|
906
|
use Moo; |
|
1
|
|
|
|
|
7311
|
|
|
1
|
|
|
|
|
38
|
|
5
|
1
|
|
|
1
|
|
7
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
6
|
|
|
|
|
|
|
has json => ( |
7
|
|
|
|
|
|
|
is => "ro", |
8
|
|
|
|
|
|
|
lazy => 1, |
9
|
|
|
|
|
|
|
init_arg => undef, |
10
|
|
|
|
|
|
|
default => sub {JSON->new()->utf8(0);} |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
$_[0]->json()->encode($_[1]); |
14
|
|
|
|
|
|
|
} |
15
|
1
|
|
|
1
|
0
|
1892
|
|
16
|
|
|
|
|
|
|
$_[0]->json()->decode($_[1]); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
1
|
0
|
1201
|
1; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=pod |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Catmandu::Serializer - A (de)serializer from and to json strings |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 DESCRIPTION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
serializer 'json' returns a binary utf-8 string, |
31
|
|
|
|
|
|
|
which only makes sense if you send your data to column of type 'binary' |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
use this serializer if your data column is a text field or a subtype of text |
34
|
|
|
|
|
|
|
(like json or jsonb in postgres) |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SEE ALSO |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
L<Catmandu::Serializer> |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |