sd-json: add sd_json_build() wrapper macro that implies SD_JSON_BUILD_OBJECT()
authorLennart Poettering <lennart@poettering.net>
Tue, 18 Jun 2024 10:21:31 +0000 (12:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 19 Jun 2024 20:50:02 +0000 (22:50 +0200)
commit004c69a27f4e2928c7a1963a4b79b2b66a1d3183
tree204deceb7adfb1d37d01f81e688ee7482e322362
parentde732ade0909c2d44a214fb1eaea5f5b1721e9f1
sd-json: add sd_json_build() wrapper macro that implies SD_JSON_BUILD_OBJECT()

In 99% of uses of sd_json_build() we want to build an object as
outermost construct. Let's shorten this most common case a bit, by
adding sd_json_buildo() that implies this. This allows us to shorten
much of our code, all across the tree.
src/shared/varlink.h
src/systemd/sd-json.h
src/test/test-json.c