Top Level Namespace

Defined Under Namespace

Modules: SensuPluginsDocker Classes: DockerApi

Instance Method Summary collapse

Instance Method Details

#parse_json(response) ⇒ Object



52
53
54
55
56
57
58
59
60
# 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