summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints/data_bags_endpoint.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef_zero/endpoints/data_bags_endpoint.rb')
-rw-r--r--lib/chef_zero/endpoints/data_bags_endpoint.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef_zero/endpoints/data_bags_endpoint.rb b/lib/chef_zero/endpoints/data_bags_endpoint.rb
index a27b35d..5fac935 100644
--- a/lib/chef_zero/endpoints/data_bags_endpoint.rb
+++ b/lib/chef_zero/endpoints/data_bags_endpoint.rb
@@ -1,4 +1,4 @@
-require 'json'
+require 'ffi_yajl'
require 'chef_zero/endpoints/rest_list_endpoint'
module ChefZero
@@ -7,7 +7,7 @@ module ChefZero
class DataBagsEndpoint < RestListEndpoint
def post(request)
contents = request.body
- name = JSON.parse(contents, :create_additions => false)[identity_key]
+ name = FFI_Yajl::Parser.parse(contents, :create_additions => false)[identity_key]
if name.nil?
error(400, "Must specify '#{identity_key}' in JSON")
elsif exists_data_dir?(request, request.rest_path[0..1] + ['data', name])