From: Felix Fietkau Date: Sun, 17 Feb 2013 22:35:36 +0000 (+0100) Subject: filter out comments in json files before pushing them through the JSON module X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=499a5ce3523e5ecf6ecc3e4dd879c9163a9d0ef1;p=project%2Fuqmi.git filter out comments in json files before pushing them through the JSON module --- diff --git a/data/gen-common.pm b/data/gen-common.pm index d9d281c..38691fb 100644 --- a/data/gen-common.pm +++ b/data/gen-common.pm @@ -22,6 +22,7 @@ $prefix eq 'ctl_' and $ctl = 1; sub get_json() { local $/; my $json = <>; + $json =~ s/^\s*\/\/ .*$//mg; return decode_json($json); }