Notes to Reproduce ActiveSupport to_json and Grape Infinite Loop Issue
- Use this app: https://github.com/boltops-tools/jets-routes-mount
- It has a grape app mounted
Use console to reproduce:
$ jets c
route = Jets::Router.routes[4]
route.to_h # calls to_json and will produce infinite loop. this has been fixed
route.to_json # infinite loop. this has been fixed
GrapeApp.to_json # will still produce infinite loop
Note: The to_h and to_json has been fixed in Jets. The GrapeApp.to_json
was root of the issue.