Class: JsonRpcObjects::Serializer::JSON
- Inherits:
-
JsonRpcObjects::Serializer
- Object
- JsonRpcObjects::Serializer
- JsonRpcObjects::Serializer::JSON
- Defined in:
- lib/json-rpc-objects/serializer/json.rb
Overview
JSON serializer using multi_json
.
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/json.rb', line 44 def deserialize(data) MultiJson.decode(data) end |
#serialize(data) ⇒ Object
Serializes data.
33 34 35 |
# File 'lib/json-rpc-objects/serializer/json.rb', line 33 def serialize(data) MultiJson.encode(data) end |