Class: JsonRpcObjects::Serializer::YAML
- Inherits:
-
JsonRpcObjects::Serializer
- Object
- JsonRpcObjects::Serializer
- JsonRpcObjects::Serializer::YAML
- Defined in:
- lib/json-rpc-objects/serializer/yaml.rb
Overview
YAML serializer using internal Ruby YAML.
Instance Method Summary collapse
-
#deserialize(data) ⇒ Object
Deserializes data.
-
#serialize(data) ⇒ Object
Serializes data.
Instance Method Details
#deserialize(data) ⇒ Object
Deserializes data.
44 45 46 |
# File 'lib/json-rpc-objects/serializer/yaml.rb', line 44 def deserialize(data) ::YAML.load(data) end |
#serialize(data) ⇒ Object
Serializes data.
33 34 35 |
# File 'lib/json-rpc-objects/serializer/yaml.rb', line 33 def serialize(data) ::YAML.dump(data) end |