pplu / cfn-perl

An object model for CloudFormation documents
Other
0 stars 5 forks source link

Stricter JSON Parser (avoid duplicate keys) #35

Open pplu opened 5 years ago

pplu commented 5 years ago

The current JSON module doesn't detect duplicate keys when parsing JSON. This is dangerous, since we can inadvertantly accept JSON that we parse in one way, but CloudFormation understands in another.

Branch https://github.com/pplu/cfn-perl/tree/json_maybexs/, using JSON::MaybeXS is failing because when it loads JSON::XS there is no duplicate key detection https://travis-ci.org/pplu/cfn-perl/builds/536295416. It works when using Cpanel::JSON::XS.

Branch https://github.com/pplu/cfn-perl/tree/use_cpanel_json_xs, using Cpanel::JSON::XS is a quick test to verify that using Cpanel::JSON::XS, everything is working. Travis is reporting failures