When serializing with JSON_C_TO_STRING_PRETTY set, keep the opening and closing curly or square braces on same line for empty objects or arrays. Issue #778.

This commit is contained in:
Eric Haszlakiewicz
2022-07-30 19:27:14 +00:00
parent 2e9b7456a5
commit 9749b0cb66
9 changed files with 42 additions and 20 deletions

View File

@@ -75,4 +75,4 @@ my_object=
foo: "bar"
bool0: false
bool1: true
my_object.to_string()={ "abc": 12, "foo": "bar", "bool0": false, "bool1": true }
my_object.to_string()={ "abc": 12, "foo": "bar", "bool0": false, "bool1": true, "empty_array": [ ], "empty_obj": { } }