diff --git a/src/modules/flow/json/json.c b/src/modules/flow/json/json.c index 51d32a9a6..4d82ecb72 100644 --- a/src/modules/flow/json/json.c +++ b/src/modules/flow/json/json.c @@ -973,8 +973,10 @@ json_serialize(struct sol_buffer *buffer, struct json_element *element) SOL_INT_CHECK(r, < 0, r); SOL_VECTOR_FOREACH_IDX (&element->children, key_element, i) { - if (i > 0) + if (i > 0) { r = sol_buffer_append_char(buffer, ','); + SOL_INT_CHECK(r, < 0, r); + } r = json_serialize_key_element(buffer, key_element); SOL_INT_CHECK(r, < 0, r); }