Date: Wed, 13 Mar 2024 11:59:18 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 277666] devel/uclcmd : uclcmd-0.2.20211204 get JSON and YAML output is broken Message-ID: <bug-277666-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277666 Bug ID: 277666 Summary: devel/uclcmd : uclcmd-0.2.20211204 get JSON and YAML output is broken Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: allanjude@FreeBSD.org Reporter: crest@rlwinm.de Assignee: allanjude@FreeBSD.org Flags: maintainer-feedback?(allanjude@FreeBSD.org) The JSON and YAML output from uclcmd is invalid. Here is simple reproducer = to show the result: ``` uclcmd get --json . <<EOF foo [{bar: baz}] EOF ``` The incorrect output is: ``` , { , "foo": [ , { "bar": "baz" } ] } ``` The correct output would be: ``` { "foo": [ { "bar": "baz" } ] } ``` The YAML output is similarly broken, but it's partially hidden the more flexible syntax where the fields of an object are separated only by whitesp= aces instead of comma, newline and indentation. The wrong YAML output (notice the extra newlines): ``` foo: [ , { bar: "baz" } ] ``` The correct YAML output would be: ``` foo: [ { bar: "baz" } ] ``` It's possible the bug isn't directly in uclcmd-0.2.20211204 and that uclcmd only exposes a bug in libucl-0.9.0. As it is right now uclcmd can't be used= to extract any values containing arrays or objects in JSON or YAML format. The= UCL formatted output works is syntactically valid and correctly represents the emitted data. The tests were performed on FreeBSD 14.0p5/amd64 with the lib= ucl and uclcmd installed from the latest branch of the official package repos. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-277666-7788>