line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: Bubblegum Wrapper around JSON Serialization |
2
|
|
|
|
|
|
|
package Bubblegum::Wrapper::Json; |
3
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
2218
|
use 5.10.0; |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
190
|
|
5
|
4
|
|
|
4
|
|
446
|
use namespace::autoclean; |
|
4
|
|
|
|
|
14952
|
|
|
4
|
|
|
|
|
25
|
|
6
|
4
|
|
|
4
|
|
582
|
use Bubblegum::Class; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
24
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
2798
|
use Class::Load 'load_class'; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
835
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
extends 'Bubblegum::Object::Instance'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '0.45'; # VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub decode { |
15
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
16
|
0
|
|
|
|
|
|
my $json = load_class('JSON::Tiny', {-version => 0.45})->new; |
17
|
0
|
|
|
|
|
|
return $json->decode($self->data); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub encode { |
21
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
22
|
0
|
|
|
|
|
|
my $json = load_class('JSON::Tiny', {-version => 0.45})->new; |
23
|
0
|
|
|
|
|
|
return $json->encode($self->data); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |