use format.encode instead of to_json/to_xml
trying to improve #51
ActiveResource::Base.format.encode is working again
Fix for degradation of recent ActiveResource::Base#encode
ActiveResource:: Formats::JsonFormat#encode and ActiveResource:: Formats::XmlFormat#encode are useless (https://github.com/rails/activeresource/blob/master/lib/active_resource/formats/json_format.rb#L17), ability to use custom formatters is broken. This PR rollback previous changes and makes #encode work again.
I totally agree with @Fivell 👍
Could you add a failing test case that show what is not working right now?