tools: port various tools to the new json-builder

Remove custom json serialization code and use the new json-builder
from various tools.

spa-json-dump now has color and raw mode and can probably be simplified
a bit more.

The properties can now serialize arbitrarily large keys, which makes
a unit test work. It also has a new 'simple' option for SPA output,
which is added and used in pw-config.
This commit is contained in:
Wim Taymans 2026-02-26 10:51:17 +01:00
parent 6753c51ab8
commit ed361a856f
6 changed files with 230 additions and 527 deletions

View file

@ -466,7 +466,7 @@ PWTEST(properties_serialize_dict_stack_overflow)
fp = fopen(tmpfile, "we");
pwtest_ptr_notnull(fp);
r = pw_properties_serialize_dict(fp, &dict, 0);
pwtest_int_eq(r, 1);
pwtest_int_eq(r, 2);
fclose(fp);
free(long_value);