diff options
| -rw-r--r-- | lib/chef/chef_fs/chef_fs_data_store.rb | 2 | ||||
| -rw-r--r-- | lib/chef/chef_fs/command_line.rb | 2 | ||||
| -rw-r--r-- | spec/support/shared/integration/integration_helper.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb index 484ab07390..3813d0edb4 100644 --- a/lib/chef/chef_fs/chef_fs_data_store.rb +++ b/lib/chef/chef_fs/chef_fs_data_store.rb @@ -168,7 +168,7 @@ class Chef end end end - JSON.pretty_generate(result) + Chef::JSONCompat.to_json_pretty(result) else begin diff --git a/lib/chef/chef_fs/command_line.rb b/lib/chef/chef_fs/command_line.rb index 43e8b276e0..8a205eef78 100644 --- a/lib/chef/chef_fs/command_line.rb +++ b/lib/chef/chef_fs/command_line.rb @@ -253,7 +253,7 @@ class Chef def self.canonicalize_json(json_text) parsed_json = Chef::JSONCompat.parse(json_text) sorted_json = sort_keys(parsed_json) - JSON.pretty_generate(sorted_json) + Chef::JSONCompat.to_json_pretty(sorted_json) end def self.diff_text(old_path, new_path, old_value, new_value) diff --git a/spec/support/shared/integration/integration_helper.rb b/spec/support/shared/integration/integration_helper.rb index b42f7f69d9..e6942c62af 100644 --- a/spec/support/shared/integration/integration_helper.rb +++ b/spec/support/shared/integration/integration_helper.rb @@ -72,7 +72,7 @@ module IntegrationSupport File.open(filename, 'w') do |file| raw = case contents when Hash, Array - JSON.pretty_generate(contents) + Chef::JSONCompat.to_json_pretty(contents) else contents end |
