Closed dlangille closed 7 months ago
I've been bitten by the same problem and 'blamed' uclcmd in FreeBSD PR #277666 (updated to link to this issue report).
The problem makes it impossible to use ucl_object_emit()
YAML, JSON and compact JSON output format for anything but scalar UCL types (int, float, string boolean, time, and maybe user-data depending on the user-data). It breaks both arrays and objects. The YAML breakage is more subtle because of its significant whitespaces.
There is a fix for the emitter that was committed to the master branch after the latest (0.9.0) release: https://github.com/vstakhov/libucl/commit/da7aacb3d46fbc206ec6f2431f503eed843a3039.
Haven't I tagged that yet? Let me check...
I've already submitted a (FreeBSD) bug report with a patch against for the libucl port, because I didn't expect such a fast turnaround. I especially worry about what the YAML output could be parsed as because I'm not sure all outputs from libucl 0.9.0 are either syntactically invalid or preserve the document structure.
I have tagged the release 0.9.1 with the fix.
Confirming, 0.9.1 fixes the issue for me. Thank you.
I noticed this regression after upgrading from 0.8.2 to 0.9.0 today. The following is a simple example broken down from one of my use cases.
with 8.0.2:
With 0.9.0, we have additional commas:
Source: