summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-01-18 16:37:29 +0000
committerThom May <thom@chef.io>2016-01-18 16:37:29 +0000
commitc48d37e27953ebb8435ec298caf59de1909f63e6 (patch)
treeeca332f3e72e77be3aa5edb3514ec7d82971805d
parent6526ae4177c0237b9d88b086c2da18f8c6a09e58 (diff)
downloadchef-c48d37e27953ebb8435ec298caf59de1909f63e6.tar.gz
Ensure we use from_hash rather than the deprecated json_create
-rw-r--r--lib/chef/chef_fs/data_handler/data_handler_base.rb2
-rw-r--r--lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/chef_fs/data_handler/data_handler_base.rb b/lib/chef/chef_fs/data_handler/data_handler_base.rb
index 53936979e3..41c5dd13e2 100644
--- a/lib/chef/chef_fs/data_handler/data_handler_base.rb
+++ b/lib/chef/chef_fs/data_handler/data_handler_base.rb
@@ -117,7 +117,7 @@ class Chef
# Turn a JSON hash into a bona fide Chef object (like Chef::Node).
#
def chef_object(object)
- chef_class.json_create(object)
+ chef_class.from_hash(object)
end
#
diff --git a/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb b/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb
index 692b6cfc73..cfc9e43955 100644
--- a/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb
+++ b/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb
@@ -102,7 +102,7 @@ class Chef
def chef_object
# REST will inflate the Chef object using json_class
- data_handler.json_class.json_create(read)
+ data_handler.json_class.from_hash(read)
end
def minimize_value(value)