line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSON::Whitespace; |
2
|
1
|
|
|
1
|
|
11392
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
3
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
4
|
|
|
|
|
|
|
require Exporter; |
5
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
6
|
|
|
|
|
|
|
our @EXPORT_OK = qw/json_minify/; |
7
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
8
|
|
|
|
|
|
|
all => \@EXPORT_OK, |
9
|
|
|
|
|
|
|
); |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
12
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
13
|
|
13
|
1
|
|
|
1
|
|
3
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.61'; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
326
|
use JSON::Tokenize 'tokenize_json'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
91
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub json_minify |
19
|
|
|
|
|
|
|
{ |
20
|
1
|
|
|
1
|
1
|
70
|
my ($json) = @_; |
21
|
1
|
|
|
|
|
48
|
my $tokens = tokenize_json ($json); |
22
|
1
|
|
|
|
|
10
|
my $nospace = strip_whitespace ($tokens, $json); |
23
|
1
|
|
|
|
|
6
|
return $nospace; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |