Class: JSONPParser
- Inherits:
-
HTTParty::Parser
- Object
- HTTParty::Parser
- JSONPParser
- Defined in:
- lib/campminder/parser.rb
Constant Summary collapse
- SupportedFormats =
{ "application/javascript" => :jsonp, "application/json" => :json }
Instance Method Summary collapse
Instance Method Details
#json ⇒ Object
13 14 15 |
# File 'lib/campminder/parser.rb', line 13 def json JSON.load(body) end |
#jsonp ⇒ Object
9 10 11 |
# File 'lib/campminder/parser.rb', line 9 def jsonp JSON.load(body.strip[2..-2], nil) end |