summaryrefslogtreecommitdiff
path: root/chef/lib/chef/shef.rb
diff options
context:
space:
mode:
Diffstat (limited to 'chef/lib/chef/shef.rb')
-rw-r--r--chef/lib/chef/shef.rb21
1 files changed, 11 insertions, 10 deletions
diff --git a/chef/lib/chef/shef.rb b/chef/lib/chef/shef.rb
index e8a224f1e2..2710e7fbb1 100644
--- a/chef/lib/chef/shef.rb
+++ b/chef/lib/chef/shef.rb
@@ -15,17 +15,18 @@
# limitations under the License.
#
-require "singleton"
-require "pp"
-require "etc"
-require "mixlib/cli"
+require 'singleton'
+require 'pp'
+require 'etc'
+require 'mixlib/cli'
require 'chef/version'
-require "chef/client"
-require "chef/config"
+require 'chef/client'
+require 'chef/config'
-require "chef/shef/shef_session"
-require "chef/shef/ext"
+require 'chef/shef/shef_session'
+require 'chef/shef/ext'
+require 'chef/json'
# = Shef
# Shef is Chef in an IRB session. Shef can interact with a Chef server via the
@@ -163,7 +164,7 @@ module Shef
end
begin
- @json_attribs = JSON.parse(json_io.read)
+ @json_attribs = Chef::JSON.from_json(json_io.read)
rescue JSON::ParserError => error
fatal!("Could not parse the provided JSON file (#{Chef::Config[:json_attribs]})!: " + error.message, 2)
end
@@ -322,4 +323,4 @@ FOOTER
end
-end \ No newline at end of file
+end