Module: Property::Serialization::JSON
Overview
Use JSON to encode properties. This is the serialization best option. It’s the fastest and does not have any binary format issues. You just have to provide ‘self.create_json’ and ‘to_json’ methods for the classes you want to serialize.
Defined Under Namespace
Class Method Summary collapse
Methods included from Encoder
decode_properties, encode_properties
Class Method Details
.included(base) ⇒ Object
42 43 44 45 |
# File 'lib/property/serialization/json.rb', line 42 def self.included(base) Property.validators << Validator base.extend Encoder end |