Method: Auth0::Mixins::HTTPProxy#safe_parse_json

Defined in:
lib/auth0/mixins/httpproxy.rb

#safe_parse_json(body) ⇒ Object


62
63
64
65
66
# File 'lib/auth0/mixins/httpproxy.rb', line 62

def safe_parse_json(body)
  JSON.parse(body.to_s)
rescue JSON::ParserError
  body
end