summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints/role_environments_endpoint.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef_zero/endpoints/role_environments_endpoint.rb')
-rw-r--r--lib/chef_zero/endpoints/role_environments_endpoint.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef_zero/endpoints/role_environments_endpoint.rb b/lib/chef_zero/endpoints/role_environments_endpoint.rb
index caac47c..d56930a 100644
--- a/lib/chef_zero/endpoints/role_environments_endpoint.rb
+++ b/lib/chef_zero/endpoints/role_environments_endpoint.rb
@@ -1,4 +1,4 @@
-require 'json'
+require 'ffi_yajl'
require 'chef_zero/rest_base'
module ChefZero
@@ -6,7 +6,7 @@ module ChefZero
# /roles/NAME/environments
class RoleEnvironmentsEndpoint < RestBase
def get(request)
- role = JSON.parse(get_data(request, request.rest_path[0..3]), :create_additions => false)
+ role = FFI_Yajl::Parser.parse(get_data(request, request.rest_path[0..3]), :create_additions => false)
json_response(200, [ '_default' ] + (role['env_run_lists'].keys || []))
end
end