mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-05-05 07:07:52 +02:00
Use JSON::MaybeXS instead of JSON (courtesy of Ethan Rooke)
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
use Getopt::Long;
|
||||
use JSON::Any;
|
||||
use JSON::MaybeXS;
|
||||
|
||||
my %Options;
|
||||
|
||||
@@ -266,7 +266,7 @@ sub parse_input
|
||||
($y, $m, $d, $special, $tag, $duration, $time, $body) =
|
||||
($1, $2, $3, $4, $5, $6, $7, $8);
|
||||
} elsif (/\{/) {
|
||||
my $obj = JSON::Any->jsonToObj($_);
|
||||
my $obj = decode_json($_);
|
||||
next unless ($obj->{date} =~ /^(\d+)-(\d+)-(\d+)$/);
|
||||
$y = $1;
|
||||
$m = $2;
|
||||
|
||||
Reference in New Issue
Block a user