diff options
Diffstat (limited to 'lib/chef_zero/endpoints/environment_endpoint.rb')
-rw-r--r-- | lib/chef_zero/endpoints/environment_endpoint.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef_zero/endpoints/environment_endpoint.rb b/lib/chef_zero/endpoints/environment_endpoint.rb index 74a175b..9d89f44 100644 --- a/lib/chef_zero/endpoints/environment_endpoint.rb +++ b/lib/chef_zero/endpoints/environment_endpoint.rb @@ -1,4 +1,4 @@ -require 'json' +require 'ffi_yajl' require 'chef_zero/endpoints/rest_object_endpoint' require 'chef_zero/chef_data/data_normalizer' @@ -24,9 +24,9 @@ module ChefZero end def populate_defaults(request, response_json) - response = JSON.parse(response_json, :create_additions => false) + response = FFI_Yajl::Parser.parse(response_json, :create_additions => false) response = ChefData::DataNormalizer.normalize_environment(response, request.rest_path[3]) - JSON.pretty_generate(response) + FFI_Yajl::Encoder.encode(response, :pretty => true) end end end |