diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-02-17 23:35:36 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-02-17 23:35:36 +0100 |
commit | 499a5ce3523e5ecf6ecc3e4dd879c9163a9d0ef1 (patch) | |
tree | 875e07534a4bdaff1ae0c5196314a14ee3917f82 | |
parent | e5e70f32ea49eb1e3aab7f13cdeb7b29b696a8a2 (diff) |
filter out comments in json files before pushing them through the JSON module
-rw-r--r-- | data/gen-common.pm | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |