Skip to content

Commit

Permalink
CHEF-2352: Use the Yajl parser, because we don't trust JSONCompat
Browse files Browse the repository at this point in the history
  • Loading branch information
btm committed Apr 26, 2012
1 parent e858228 commit cb586a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chef/lib/chef/knife/core/object_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def find_all_object_dirs(path)
def object_from_file(filename)
case filename
when /\.(js|json)$/
r = Chef::JSONCompat.from_json(IO.read(filename))
r = Yajl::Parser.parse(IO.read(filename))

# Chef::DataBagItem doesn't work well with the json_create method
if @klass == Chef::DataBagItem
r
Expand Down

0 comments on commit cb586a1

Please sign in to comment.