jeremyevans/sequel — Issue #396: Sequel's atom-based column naming conflicts with serializers
Author: Cloven
Created: 2011-11-04 20:49:52+00:00
State: open

JSON, MessagePack, and other popular serialization/deserialization packages do not work well with atoms. Only the lower-performant and space-consuming Marshal serializer is able to 'bring back' column names as atoms from its serialization format.

Given the prevalence of JSON and other systems, and the requirement to stash a model (e.g. in a cache) and reconstitute it in a form that can be used, I propose a configuration option in which column names are strings rather than atoms so that interoperability can be achieved without headaches.

Note: the obvious (at least to me) solution of attempting to re-atomize the column names after deserialization runs into difficulties when the data structure is arbitrarily sized and arbitrarily deep.