Smart/Renderer/JSON.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 93.7% 15 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
render
1.0
CRAP 1.0
« Smart/Renderer/YAML.pm ↑ Summary Smart.pm »
1 package Data::Hash::Diff::Smart::Renderer::JSON;
2  
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 41 ▶sub render {
Subroutine render: called CC=1 SCAR=0.0
Pod undocumented
7 41 my $changes = $_[0];
8  
9 41 require JSON::MaybeXS;
10 41 JSON::MaybeXS->import();
11  
12 # Encode with canonical ordering for stable test output
13 41 my $json = JSON::MaybeXS->new(
14 utf8 => 1,
15 canonical => 1,
16 pretty => 0,
17 );
18  
19 41 return $json->encode($changes);
20 }
21  
22 6 1;
« Smart/Renderer/YAML.pm ↑ Summary Smart.pm »