Subject: Re: [PATCH iproute2-next v3 1/2] dcb: add new pcp-prio parameter to dcb app

From: Stephen Hemminger <[email-masked]>
Date: Sat, 3 Dec 2022 09:00:52 -0800

On Fri, 2 Dec 2022 10:22:34 +0100
Daniel Machon <[email-masked]> wrote:

> +static int dcb_app_print_key_pcp(__u16 protocol)
> +{
> +	/* Print in numerical form, if protocol value is out-of-range */
> +	if (protocol > DCB_APP_PCP_MAX) {
> +		fprintf(stderr, "Unknown PCP key: %d\n", protocol);
> +		return print_uint(PRINT_ANY, NULL, "%d:", protocol);
> +	}
> +
> +	return print_string(PRINT_ANY, NULL, "%s:", pcp_names[protocol]);
> +}

This is not an application friendly way to produce JSON output.
You need to put a key on each one, and value should not contain colon.