module Property::Serialization::JSON

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.

Public Class Methods

included(base) click to toggle source
# File lib/property/serialization/json.rb, line 42
def self.included(base)
  Property.validators << Validator
  base.extend Encoder
end