brianmario / yajl-ruby

A streaming JSON parsing and encoding library for Ruby (C bindings to yajl)
http://rdoc.info/projects/brianmario/yajl-ruby
MIT License
1.48k stars 169 forks source link

WIP: Add as_json to yajl #189

Closed eileencodes closed 3 years ago

eileencodes commented 5 years ago

Support as_json so we can change Rails' json implementation and this method is required. Yajl used to not support as_json because there was an infinite loop, but here if the object returns from as_json is not the one that we called as_json on then we dump that.

cc/ @tenderlove @brianmario

eileencodes commented 5 years ago

We don't want to merge this yet, as we first need to get Rails green.

brianmario commented 3 years ago

Wow this is old, sorry about that!

Is this still of interest to you to get shipped?

eileencodes commented 3 years ago

Actually we should probably close this. I think we kind of determined that replacing json in Rails with Yajl was going to be too hard due to some monkey patching Rails does. This was a PR where we kind of attempted to fix it https://github.com/rails/rails/pull/34578. @tenderlove if you want to revive this let me know and I'll reopn.