This project is archived and is in readonly mode.
ActiveResource is not parsing JSON correct
-
Denis Odorcic
- Tag changed from activeresource, json to activeresource, json, patch, verified
Verified that ActiveResource JSON is not working at all. Resource.include_root_in_json was defaulted to true in #3770 [PATCH] Fix changing ActiveModel include_root_in_json = true to default but wasn't handled when decoding in ActiveResource. I've attached is a patch which does so.
I also had to fix the tests in format_test.rb as they were incorrectly encoding objects for JSON, and relying on a specific way that XML decodes its objects to get the tests to pass. Feedback on what I did with the tests would be good.
-
stonefield
Thanks Denis,
I applied the patch, and it seems to work correctly.
I also reviewed the tests and I think they look good, but I might not be the right person to verify those. -
Rohit Arondekar
- State changed from new to open
- Assigned user set to José Valim
- Importance changed from to Low
-
Denis Odorcic
- Tag set to activeresource, json
No love for ActiveResource and JSON eh? :( Ran into this again today at work which reminded me about the ticket.
-
rails
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
rails
- State changed from open to stale
-
stonefield
Add the patch, please.
Tests viewed and seems good.
Verified that the patch is working.
Have system in production with this code. -
Denis Odorcic
- State changed from stale to open
I guess this should still be in [state:open] then since there hasn't been any change to ActiveResource JSON decoding.
