homebridge-plugins / node-arlo

JS library for Arlo Cameras
17 stars 15 forks source link

Serialise Devices #18

Open SmolSoftBoi opened 4 years ago

SmolSoftBoi commented 4 years ago

Describe The Bug: Unable to serialise the device classes.

To Reproduce: JSON.stringify(device)

Expected behavior: Serialise device to JSON.

Logs:

TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'ArloBaseStation'
    |     property 'parent' -> object with constructor 'Arlo'
    |     property 'devices' -> object with constructor 'Object'

Environment:

donavanbecker commented 3 years ago

@EpicKris Any progress on typescript in the beta?

SmolSoftBoi commented 3 years ago

@EpicKris Any progress on typescript in the beta?

The beta fixes this issue by removing all circular dependencies.

donavanbecker commented 3 years ago

@EpicKris awesome!

donavanbecker commented 2 years ago

@EpicKris Can you please transfer this back to me?

donavanbecker commented 2 years ago

@EpicKris ? Please