From 2a9f12b4503c9b8deed2b1229877b978478a0b3b Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Wed, 21 May 2014 09:40:41 -0700 Subject: [PATCH] convert to using ffi_yajl --- lib/chef/knife/core/object_loader.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/chef/knife/core/object_loader.rb b/lib/chef/knife/core/object_loader.rb index 1d207c10d10..de683b23fd0 100644 --- a/lib/chef/knife/core/object_loader.rb +++ b/lib/chef/knife/core/object_loader.rb @@ -16,6 +16,8 @@ # limitations under the License. # +require 'ffi_yajl' + class Chef class Knife module Core @@ -83,7 +85,7 @@ def find_all_object_dirs(path) def object_from_file(filename) case filename when /\.(js|json)$/ - r = Yajl::Parser.parse(IO.read(filename)) + r = FFI_Yajl::Parser.parse(IO.read(filename)) # Chef::DataBagItem doesn't work well with the json_create method if @klass == Chef::DataBagItem