ohler55/oj — pull request #9 by sauliusg (2012-03-29 19:49:46+00:00)
Title: serialize any Object#as_json return value, not only Hash

Hello,

I tried oj on one project and couldn't make it work because #as_json calls on Objects always except Hash as return value (which is a convention if I understood correctly). Unfortunately, this not always the case (even with ActiveSupport, see here for example https://github.com/rails/rails/blob/master/activesupport/lib/active_support/duration.rb).

Is this a bug or perhaps I'm missing something here?

Thanks