mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-02 01:40:31 -05:00
json-builder: avoid indent on the first item
Avoids putting a \n or (now also) space as the first item.
This commit is contained in:
parent
bdbb5f6d27
commit
03662b3dfe
1 changed files with 1 additions and 1 deletions
|
|
@ -184,7 +184,7 @@ void spa_json_builder_add_simple(struct spa_json_builder *b, const char *key, in
|
|||
break;
|
||||
}
|
||||
|
||||
fprintf(b->f, "%s%s%*s", b->delim, indent ? b->count == 0 ? "" : "\n" : space ? " " : "",
|
||||
fprintf(b->f, "%s%s%*s", b->delim, b->count == 0 ? "" : indent ? "\n" : space ? " " : "",
|
||||
indent ? b->level : 0, "");
|
||||
if (key) {
|
||||
bool key_raw = force_raw || (simple && spa_json_make_simple_string(&key, &key_len)) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue