X-Git-Url: http://git.ieval.ro/?p=app-musicexpo.git;a=blobdiff_plain;f=lib%2FApp%2FMusicExpo.pm;h=ef99911562494db12f098cdc34bd9016ce0d12bd;hp=242e0df0cd19d66cba78cc883ad27b3c965edfb6;hb=dfe0cbe22817910d2c942a891875fa95a2225584;hpb=c681179f99c8f2a7c501639c19ff65a740a8b7ea diff --git a/lib/App/MusicExpo.pm b/lib/App/MusicExpo.pm index 242e0df..ef99911 100644 --- a/lib/App/MusicExpo.pm +++ b/lib/App/MusicExpo.pm @@ -15,7 +15,7 @@ use DB_File qw//; use File::Basename qw/fileparse/; use Fcntl qw/O_RDWR O_CREAT/; use Getopt::Long; -use JSON; +use JSON::MaybeXS; use Storable qw/thaw freeze/; ################################################## @@ -129,7 +129,7 @@ sub run { push @files, \%entry } - my $json = JSON->new->utf8->canonical->encode({files => \@files, prefix => $prefix}); + my $json = JSON::MaybeXS->new(canonical => 1)->encode({files => \@files, prefix => $prefix}); $json =~ s//>/g; $ht->param(files=>[sort { $a->{title} cmp $b->{title} } @files], prefix => $prefix, json => $json);