Closed bjedrocha closed 3 years ago
My only question, is string keys the norm or symbol keys the norm?
I think at this point it's personal preference, especially with newer versions of Ruby. In this specific case though it doesn't matter since the hash returned by ActiveSupport::JSON.decode
is only used internally and not returned as part of the public interface.
@Daniel-ltw I managed to fix the failing CI build. Are you good to merge this and cut a new version?
Merged and updated the version on master branch.
Will allow @mhgbrown to build and release the gem.
@bjedrocha and @Daniel-ltw thanks! Will get to it soon!
Under the hood, ActiveResource uses
ActiveSupport::JSON.decode
to parse JSON. UnlikeJSON.parse
,ActiveSupport::JSON.decode
will convert any strings it recognizes as dates/times into their corresponding objects ifActiveSupport.parse_json_times
is enabled. Ref.Thus currently if
ActiveSupport.parse_json_times
is enabled, the data returned from cache is inconsistent with what is returned from ActiveResource directly. This change fixes the inconsistency by also usingActiveSupport::JSON.decode
to parse the JSON from cache.