Closed robb-brown closed 4 months ago
hi,
the library was just migrated to use ArduinoJSON 7.x only, so things may have changed to the better .... or gotten worse :-)
either way I suggest you update to version 1.4.1 of YAMLDuino (currently propagating to platformio and arduino library registries) and reopen this issue if the problem is still there
There seems to be a problem with the ArduinoJson binding specifically affecting lists of objects. Here is a minimal example that takes a simple YAML list of objects, deserializes it, then reserializes it to Serial. It does this twice, in two different ways:
1) The manual way: use YAMLDuino to convert the YAML to JSON, then deserialize that JSON using ArduinoJSON, then reserialize using ArduinoJSON.
2) Use YAMLDuino + ArduinoJson bindings to deserialize the YAML directly to an ArduinoJson document, then serialize to JSON.
(1) works, (2) loses the content of the objects.
Code:
Output:
I also tried #1 with OUTPUT_JSON instead of OUTPUT_JSON_PRETTY and it still worked fine, so the issue seems to be somewhere in the bindings themselves.