vstakhov / libucl

Universal configuration library parser
BSD 2-Clause "Simplified" License
1.63k stars 139 forks source link

streamline API generates invalid json #277

Closed bapt closed 9 months ago

bapt commented 10 months ago

when exporting to json_compact using streamline API

If I create an array, which I populate with objects, ,then close the arrary of contianer there is a missing "," before the key of the next object

{ "packages": [ {OBJ1}, {OBJ2}, {OBJ3}]"groups": [...] }
vstakhov commented 10 months ago

Thank you for the report! Do you have a piece of code to reproduce this issue by chance?

bapt commented 10 months ago

convert test/test_streamline.c to expose COMPACT_JSON and you have a broken example

vstakhov commented 9 months ago

This might be fixed now, but I'd say the whole streamline API is not well tested and is massively a hack :(

bapt commented 9 months ago

yes it works now thank you!