browser: force perl decode of caniuse json
[sheet.git] / tools / mkcaniuse
index 53cd9047ecff037ce304e4272d5e63f0bca5cc5e..07531d48c019b03b3411ccab9026b8c743444144 100755 (executable)
@@ -3,11 +3,11 @@ use 5.014;
 use warnings;
 
 use Data::Dump 'pp';
-use JSON;
+use JSON::PP;
 use File::stat;
 use Time::Piece;
 
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 
 local $/;  # slurp
 my $source = readline;
@@ -15,7 +15,7 @@ my $source = readline;
 $JSON::PP::false = 0;
 $JSON::PP::true  = 1;
 
-my $data = from_json($source);
+my $data = decode_json($source);
 my $update = eval { stat(${^LAST_FH} // $ARGV)->mtime }
        or warn "Could not determine input time\n";
 $data->{-date} = Time::Piece->new($update)->datetime;