diff options
-rw-r--r-- | lib/chef/cookbook_version.rb | 2 | ||||
-rw-r--r-- | lib/chef/data_bag.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb index 580a64ffbe..a70c892e1b 100644 --- a/lib/chef/cookbook_version.rb +++ b/lib/chef/cookbook_version.rb @@ -565,7 +565,7 @@ class Chef cookbook_version.manifest = o # We don't need the following step when we decide to stop supporting deprecated operators in the metadata (e.g. <<, >>) - cookbook_version.manifest["metadata"] = JSON.parse(cookbook_version.metadata.to_json) + cookbook_version.manifest["metadata"] = Chef::JSONCompat.from_json(cookbook_version.metadata.to_json) cookbook_version.freeze_version if o["frozen?"] cookbook_version diff --git a/lib/chef/data_bag.rb b/lib/chef/data_bag.rb index 9ce6215b20..be88d07e59 100644 --- a/lib/chef/data_bag.rb +++ b/lib/chef/data_bag.rb @@ -101,7 +101,7 @@ class Chef end Dir.glob(File.join(Chef::Config[:data_bag_path], "#{name}", "*.json")).inject({}) do |bag, f| - item = JSON.parse(IO.read(f)) + item = Chef::JSONCompat.from_json(IO.read(f)) bag[item['id']] = item bag end |