File tree 2 files changed +14
-5
lines changed 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
1
{{$NEXT}}
2
2
3
+ - The JSON plugin now uses JSON::MaybeXS instead of JSON.pm. Patch by Greg
4
+ Oschwald. GitHub #37.
5
+
6
+
3
7
0.27 2015-07-04
4
8
5
9
[BUG FIXES]
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package Code::TidyAll::Plugin::JSON;
3
3
use strict;
4
4
use warnings;
5
5
6
- use JSON ();
6
+ use JSON::MaybeXS ();
7
7
use Moo;
8
8
9
9
our $VERSION = ' 0.28' ;
@@ -16,7 +16,12 @@ sub transform_source {
16
16
my $self = shift ;
17
17
my $source = shift ;
18
18
19
- my $json = JSON-> new-> utf8-> relaxed-> pretty-> canonical;
19
+ my $json = JSON::MaybeXS-> new(
20
+ canonical => 1,
21
+ pretty => 1,
22
+ relaxed => 1,
23
+ utf8 => 1,
24
+ );
20
25
21
26
$json = $json -> ascii if $self -> ascii;
22
27
@@ -25,7 +30,7 @@ sub transform_source {
25
30
26
31
1;
27
32
28
- # ABSTRACT: Use the JSON module to tidy JSON documents with tidyall
33
+ # ABSTRACT: Use the JSON::MaybeXS module to tidy JSON documents with tidyall
29
34
30
35
__END__
31
36
@@ -41,8 +46,8 @@ __END__
41
46
42
47
=head1 DESCRIPTION
43
48
44
- Uses L<JSON> to format JSON files. Files are put into a canonical format with
45
- the keys of objects sorted.
49
+ Uses L<JSON::MaybeXS > to format JSON files. Files are put into a canonical
50
+ format with the keys of objects sorted.
46
51
47
52
=head1 CONFIGURATION
48
53
You can’t perform that action at this time.
0 commit comments