Class: Sequel::Serialization::JsonSerializer

Inherits:
Serializer show all
Defined in:
lib/sequel/serializer/json_serializer.rb

Overview

def from_json(json)

  self.attributes = ActiveSupport::JSON.decode(json)
  self
end

Instance Attribute Summary

Attributes inherited from Serializer

#options

Instance Method Summary collapse

Methods inherited from Serializer

#add_includes, #initialize, #serializable_attribute_names, #serializable_method_names, #serializable_names, #serializable_record, #to_s

Constructor Details

This class inherits a constructor from Sequel::Serialization::Serializer

Instance Method Details

#serializeObject

:nodoc:



97
98
99
# File 'lib/sequel/serializer/json_serializer.rb', line 97

def serialize
  serializable_record.to_json
end