Module: MsRest::Serialization
- Included in:
- JSONable
- Defined in:
- lib/ms_rest/serialization.rb,
lib/ms_rest.rb
Overview
Base module for Ruby serialization and deserialization.
Provides methods to serialize Ruby object into Ruby Hash and to deserialize Ruby Hash into Ruby object.
Defined Under Namespace
Classes: Serialization
Instance Method Summary collapse
-
#deserialize(mapper, response_body) ⇒ Object
Deserialize the response from the server using the mapper.
-
#serialize(mapper, object) ⇒ Object
Serialize the Ruby object into Ruby Hash to send it to the server using the mapper.
Instance Method Details
#deserialize(mapper, response_body) ⇒ Object
Deserialize the response from the server using the mapper.
18 19 20 |
# File 'lib/ms_rest/serialization.rb', line 18 def deserialize(mapper, response_body) build_serializer.deserialize(mapper, response_body) end |
#serialize(mapper, object) ⇒ Object
Serialize the Ruby object into Ruby Hash to send it to the server using the mapper.
29 30 31 |
# File 'lib/ms_rest/serialization.rb', line 29 def serialize(mapper, object) build_serializer.serialize(mapper, object) end |