I am writing a very simple proxy wrapper for the reddit api so I can make cross domain JSONP requests (reddit does not allow JSONP calls to my knowledge).
I am using
It's not that the JSON is too large. It's nested too deeply. HTTParty
tries to decode the results that it gets automatically. Following your stack trace, and the HTTParty
dependencies, it relies on multi_json
which is using the json
gem.
Inside of json
there is lib/json/pure/parser.rb. The default max depth set is set in there, specifically on line 79. Something in your returned JSON is 20+ levels deep, triggering the exception.
if !opts.key?(:max_nesting) # defaults to 19
@max_nesting = 19