Skip to content

Feature Request: Add formal serialization/de-serialization to methods to data objects #112

Description

@dzimmanck

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions