Method: Bark::Response#parse_json

Defined in:
lib/bark/response.rb

#parse_json(string) ⇒ Object

Parse the json, and store it in @json.



29
30
31
32
33
34
35
36
# File 'lib/bark/response.rb', line 29

def parse_json(string)
  begin
    @json = JSON.parse(string) 
  rescue JSON::ParserError => e
    puts e.message
    ap request
  end
end