Module: Property::Serialization::JSON::Encoder
- Included in:
- Property::Serialization::JSON, Property::Serialization::JSON
- Defined in:
- lib/property/serialization/json.rb
Instance Method Summary collapse
-
#decode_properties(string) ⇒ Object
Decode Marshal encoded properties.
-
#encode_properties(properties) ⇒ Object
Encode properties with JSON.
Instance Method Details
#decode_properties(string) ⇒ Object
Decode Marshal encoded properties
34 35 36 |
# File 'lib/property/serialization/json.rb', line 34 def decode_properties(string) ::JSON.parse(string) end |
#encode_properties(properties) ⇒ Object
Encode properties with JSON
29 30 31 |
# File 'lib/property/serialization/json.rb', line 29 def encode_properties(properties) properties.to_json end |