Module: Property::Serialization::JSON::Encoder

Included in:
Property::Serialization::JSON, Property::Serialization::JSON
Defined in:
lib/property/serialization/json.rb

Instance Method Summary collapse

Instance Method Details

#decode_properties(string) ⇒ Object

Decode JSON encoded properties



54
55
56
# File 'lib/property/serialization/json.rb', line 54

def decode_properties(string)
  ::JSON.parse(string)
end

#encode_properties(properties) ⇒ Object

Encode properties with JSON



49
50
51
# File 'lib/property/serialization/json.rb', line 49

def encode_properties(properties)
  ::JSON.dump(properties)
end