module Sequel::Plugins::Serialization

def self.apply(model, *args)

to save the value in deserialized_values.
Set up the column readers to do deserialization and the column writers
def self.apply(model, *args)
  model.instance_eval do
    @deserialization_map = {}
    @serialization_map = {}
  end
end

def self.configure(model, format=nil, *columns)

no columns were provided.
Automatically call serialize_attributes with the format and columns unless
def self.configure(model, format=nil, *columns)
  model.serialize_attributes(format, *columns) unless columns.empty?
end

def self.register_format(format, serializer, deserializer)

should be callable objects.
models to pick this format by name. Both serializer and deserializer
Register a serializer/deserializer pair with a format symbol, to allow
def self.register_format(format, serializer, deserializer)
  REGISTERED_FORMATS[format] = [serializer, deserializer]
end