Open
Description
First off, I am not sure that GrapeEntity is the place to fix this. But we should talk about this here at least.
When an object is serialized I would expect the serialization to produce a copy of the data in the object. Modifying the serialized hash should not modify the original object.
This is not the case if the original object contains a hash, for example when an ActiveRecord Model object contains JSON or an HStore. Modifying that data in the resultant serializable hash actually modifies the original JSON or HStore data on the active record object.
In order to protect the integrity of these datatypes I've resorted to the exposing a "dup'd" version of the object.
Thoughts?