line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Clustericious::Coder::JSON; |
2
|
|
|
|
|
|
|
|
3
|
25
|
|
|
25
|
|
6380
|
use strict; |
|
25
|
|
|
|
|
51
|
|
|
25
|
|
|
|
|
662
|
|
4
|
25
|
|
|
25
|
|
120
|
use warnings; |
|
25
|
|
|
|
|
47
|
|
|
25
|
|
|
|
|
522
|
|
5
|
25
|
|
|
25
|
|
112
|
use JSON::MaybeXS (); |
|
25
|
|
|
|
|
47
|
|
|
25
|
|
|
|
|
287
|
|
6
|
25
|
|
|
25
|
|
360
|
use 5.010; |
|
25
|
|
|
|
|
78
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: JSON encoder for AutodataHandler |
9
|
|
|
|
|
|
|
our $VERSION = '1.27'; # VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub coder |
12
|
|
|
|
|
|
|
{ |
13
|
62
|
|
|
62
|
0
|
417
|
my $json = JSON::MaybeXS->new |
14
|
|
|
|
|
|
|
->allow_nonref |
15
|
|
|
|
|
|
|
->allow_blessed |
16
|
|
|
|
|
|
|
->convert_blessed; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my %coder = ( |
19
|
|
|
|
|
|
|
type => 'application/json', |
20
|
|
|
|
|
|
|
format => 'json', |
21
|
28
|
|
|
28
|
|
769
|
encode => sub { $json->encode($_[0]) }, |
22
|
4
|
|
|
4
|
|
149
|
decode => sub { $json->decode($_[0]) }, |
23
|
62
|
|
|
|
|
1568
|
); |
24
|
|
|
|
|
|
|
|
25
|
62
|
|
|
|
|
169
|
\%coder; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=pod |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=encoding UTF-8 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Clustericious::Coder::JSON - JSON encoder for AutodataHandler |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 VERSION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
version 1.27 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 AUTHOR |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Original author: Brian Duggan |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Current maintainer: Graham Ollis E<lt>plicease@cpan.orgE<gt> |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Contributors: |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Curt Tilmes |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Yanick Champoux |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This software is copyright (c) 2013 by NASA GSFC. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
61
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |