Class: DjiMqttConnect::Thing::Product::ServicesMarshal

Inherits:
MessageMarshal
  • Object
show all
Includes:
Utils::MessageDumping
Defined in:
lib/dji_mqtt_connect/marshals/thing/product/services_marshal.rb

Instance Method Summary collapse

Methods inherited from MessageMarshal

#load

Instance Method Details

#dump(message) ⇒ Object

Converts a message for transmission via MQTT



11
12
13
14
15
16
17
# File 'lib/dji_mqtt_connect/marshals/thing/product/services_marshal.rb', line 11

def dump(message)
  # Fix up the hash representation
  transformed_message = convert_message_to_hash(message)

  # Convert the transformed message into JSON
  JSON.generate(transformed_message)
end