From 499a5ce3523e5ecf6ecc3e4dd879c9163a9d0ef1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 17 Feb 2013 23:35:36 +0100 Subject: [PATCH] filter out comments in json files before pushing them through the JSON module --- data/gen-common.pm | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.11.0