On Thu, May 08, 2025 at 11:47:16PM +0200, Phil Sutter wrote: > The function introduced in previous patch relaxes JSON syntax in parsing > selected properties which usually contain an array as value to also > accept a string representing the only array element. > > The test asserting correct parsing of such properties exposed JSON > printer's limitation in some properties to not reduce the array value > when possible. > > To make things consistent, This series enhances the JSON printer by > support for array reduction where missing (patches 2-4), then introduces > a shared routine to combine the common idiom in patch 5. Patch 6 finally > adds the actual shell test case. Patch 1 is merely fallout, a trivial > fix identified when working on the test implementation. Acked-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>