class Object

Public Instance Methods

parse_json(response) click to toggle source
# File lib/sensu-plugins-docker/client_helpers.rb, line 52
def parse_json(response)
  parsed = nil
  begin
    parsed = JSON.parse(response.read_body)
  rescue JSON::ParserError => e
    raise "JSON Error: #{e.inspect}"
  end
  parsed
end