Module: BulkProcessor::PayloadSerializer
- Defined in:
- lib/bulk_processor/payload_serializer.rb
Overview
The payload must be serialized to be command line friendly (since Dynosaur runs a rake task with command-line args)
Class Method Summary collapse
-
.deserialize(string) ⇒ Hash
The original Hash payload (with all keys and values stringified).
-
.serialize(payload) ⇒ String
A serialized version of the string that can be passed to any of the back-ends.
Class Method Details
.deserialize(string) ⇒ Hash
Returns the original Hash payload (with all keys and values stringified).
20 21 22 |
# File 'lib/bulk_processor/payload_serializer.rb', line 20 def deserialize(string) Rack::Utils.parse_nested_query(string) end |
.serialize(payload) ⇒ String
Returns a serialized version of the string that can be passed to any of the back-ends.
13 14 15 |
# File 'lib/bulk_processor/payload_serializer.rb', line 13 def serialize(payload) URI.encode_www_form(payload) end |