Module: MsRest::Serialization
- 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_name) ⇒ Object
Deserialize the response from the server using the mapper.
-
#serialize(mapper, object, object_name) ⇒ 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_name) ⇒ 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, object_name) build_serializer.deserialize(mapper, response_body, object_name) end |
#serialize(mapper, object, object_name) ⇒ 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, object_name) build_serializer.serialize(mapper, object, object_name) end |