Class: MailchimpPsuedoJSONParser
- Inherits:
-
HTTParty::Parser
- Object
- HTTParty::Parser
- MailchimpPsuedoJSONParser
- Defined in:
- lib/mailchimp/ext/httparty.rb
Instance Method Summary collapse
-
#json ⇒ Object
Unfornately Mailchimp’s API returns invalid JSON for some valid requests, specifically mandrill’s users/ping.
Instance Method Details
#json ⇒ Object
Unfornately Mailchimp’s API returns invalid JSON for some valid requests, specifically mandrill’s users/ping. We need to just pass that through instead of blowing up inside of HTTParty so that we can do something with it later.
5 6 7 8 9 10 11 |
# File 'lib/mailchimp/ext/httparty.rb', line 5 def json begin MultiJson.decode(body) rescue body end end |