You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The XBee data and metadata objects (messages, status, addresses, etc) are not natively JSON serializable, which slightly complicates integration of this library into a multi-agent control frameworks where agents communicate over a message brokers such as ZeroMQ, RabbitMQ, or Mosquitto, which require all messages JSON serializable. I find myself frequently building serializations for the XBee data classes.
Since the serialize/deserialize format must be compatible between sender and reeiver, it would be good if there are formal serialize/deserialize methods build into these objects to guarantee this compatibility. Something like:
msq = device.read(...)
msq_json = msg.to_json()
publish(msq_json) # some publish over a message broker
from digi.xbee.utils import read_json
msg = read_json(msq_json)
The text was updated successfully, but these errors were encountered:
The XBee data and metadata objects (messages, status, addresses, etc) are not natively JSON serializable, which slightly complicates integration of this library into a multi-agent control frameworks where agents communicate over a message brokers such as ZeroMQ, RabbitMQ, or Mosquitto, which require all messages JSON serializable. I find myself frequently building serializations for the XBee data classes.
Since the serialize/deserialize format must be compatible between sender and reeiver, it would be good if there are formal serialize/deserialize methods build into these objects to guarantee this compatibility. Something like:
msq = device.read(...)
msq_json = msg.to_json()
publish(msq_json) # some publish over a message broker
from digi.xbee.utils import read_json
msg = read_json(msq_json)
The text was updated successfully, but these errors were encountered: