Class: Response::ParseJson
- Inherits:
-
Middleware
- Object
- Middleware
- Response::ParseJson
- Defined in:
- lib/faraday/response/parse_json.rb
Instance Method Summary collapse
Instance Method Details
#parse(body) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/faraday/response/parse_json.rb', line 7 def parse(body) case body when nil nil when '' nil when 'true' true when 'false' false else ::MultiJson.decode(body) end end |