fix quoting in AsyncWgetFileGetter again
[videosite.git] / videosite / JSJSONArrayParser.pm
index 052e325..7a3b755 100644 (file)
@@ -8,7 +8,7 @@
 package videosite::JSJSONArrayParser;
 
 use videosite::JSArrayParser;
-use JSON;
+use JSON -support_by_pp;
 @ISA = qw(videosite::JSArrayParser);
 
 use strict;
@@ -23,8 +23,11 @@ sub new {
 sub parse {
     my $self = shift;
     my $s = shift;
+    my $j = JSON->new();
+    my $content;
 
-    return decode_json($s);
+    ($content, undef) = $j->loose->allow_barekey()->allow_singlequote()->decode_prefix($s);
+    return $content;
 }
 
 1;