summaryrefslogtreecommitdiff
path: root/lib/chef/data_bag.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/data_bag.rb')
-rw-r--r--lib/chef/data_bag.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/data_bag.rb b/lib/chef/data_bag.rb
index 1133aa3e73..a901517a65 100644
--- a/lib/chef/data_bag.rb
+++ b/lib/chef/data_bag.rb
@@ -54,16 +54,16 @@ class Chef
def to_hash
result = {
- "name" => @name,
+ 'name' => @name,
'json_class' => self.class.name,
- "chef_type" => "data_bag",
+ 'chef_type' => 'data_bag',
}
result
end
# Serialize this object as a hash
def to_json(*a)
- to_hash.to_json(*a)
+ ::Chef::JSONCompat.to_json(to_hash, *a)
end
def chef_server_rest
@@ -164,4 +164,3 @@ class Chef
end
end
-