diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-08-09 10:04:58 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-08-09 10:04:58 -0700 |
commit | adbb0fa85cc45b93ba91dc3019094b312cafb35c (patch) | |
tree | 3641e4a23139497a2bd6c3f29af00acad1427beb /lib/chef/data_bag_item.rb | |
parent | 54db1bedbc0a8d00e3b1fc12c50658f1d48b7a6e (diff) | |
download | chef-adbb0fa85cc45b93ba91dc3019094b312cafb35c.tar.gz |
remove #to_json Monkeypatching
Diffstat (limited to 'lib/chef/data_bag_item.rb')
-rw-r--r-- | lib/chef/data_bag_item.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/chef/data_bag_item.rb b/lib/chef/data_bag_item.rb index 07dd15a1dc..a537880f41 100644 --- a/lib/chef/data_bag_item.rb +++ b/lib/chef/data_bag_item.rb @@ -112,13 +112,13 @@ class Chef # Serialize this object as a hash def to_json(*a) result = { - "name" => self.object_name, + "name" => object_name, "json_class" => self.class.name, - "chef_type" => "data_bag_item", - "data_bag" => self.data_bag, - "raw_data" => self.raw_data + "chef_type" => "data_bag_item", + "data_bag" => data_bag, + "raw_data" => raw_data } - result.to_json(*a) + ::Chef::JSONCompat.to_json(result, *a) end def self.from_hash(h) @@ -210,5 +210,3 @@ class Chef end end - - |