Class: Pinecone::ResponseParser

Inherits:
HTTParty::Parser
  • Object
show all
Defined in:
lib/pinecone/response_parser.rb

Constant Summary collapse

SupportedFormats =

standard:disable Naming/ConstantName

{
  "application/json" => :json,
  "text/plain" => :json
}

Instance Method Summary collapse

Instance Method Details

#jsonObject

standard:enable Naming/ConstantName



10
11
12
13
14
# File 'lib/pinecone/response_parser.rb', line 10

def json
  JSON.parse(body)
rescue
  body
end