Lennart Poettering
319a4f27c4
json: teach json builder "conditional" object fields
...
Quite often when we generate objects some fields should only be
generated in some conditions. Let's add high-level support for that.
Matching the existing JSON_BUILD_PAIR() this adds
JSON_BUILD_PAIR_CONDITIONAL() which is very similar, but takes an
additional parameter: a boolean condition. If "true" this acts like
JSON_BUILD_PAIR(), but if false then the whole pair is suppressed.
This sounds simply, but requires a tiny bit of complexity: when complex
sub-variants are used in fields, then we also need to suppress them.
2018-11-28 08:38:55 +01:00
..
2018-11-22 10:54:38 +01:00
2018-11-22 10:54:38 +01:00
2018-11-24 02:40:32 +09:00
2018-11-22 10:54:38 +01:00
2018-11-26 14:08:46 +01:00
2018-11-27 10:12:27 +01:00
2018-11-22 10:54:38 +01:00
2018-11-26 06:43:36 +09:00
2018-11-28 08:38:55 +01:00
2018-11-22 10:54:38 +01:00
2018-11-20 11:18:22 +01:00
2018-11-22 10:54:38 +01:00
2018-11-27 13:18:26 +01:00
2018-11-22 10:54:38 +01:00
2018-11-26 14:08:46 +01:00
2018-11-22 10:54:38 +01:00
2018-11-22 10:54:38 +01:00
2018-11-22 10:54:38 +01:00
2018-11-22 10:54:38 +01:00
2018-11-22 10:54:38 +01:00
2018-11-22 10:54:38 +01:00
2018-11-20 16:48:21 +01:00
2018-11-22 10:54:38 +01:00
2018-11-28 11:33:27 +09:00
2018-11-21 13:40:24 +01:00
2018-11-21 13:40:24 +01:00
2018-11-22 10:54:38 +01:00
2018-11-20 18:40:02 +01:00
2018-11-20 18:40:02 +01:00
2018-11-22 10:54:38 +01:00
2018-11-24 03:53:18 +09:00
2018-11-22 10:54:38 +01:00
2018-11-27 10:12:27 +01:00
2018-11-26 14:08:46 +01:00
2018-10-19 22:34:50 +02:00
2018-11-28 13:08:19 +09:00
2018-11-28 13:08:19 +09:00
2018-11-23 09:16:11 +01:00
2018-11-23 06:22:30 +09:00
2018-11-26 14:08:46 +01:00
2018-11-28 13:08:19 +09:00
2018-11-22 10:54:38 +01:00
2018-11-20 18:40:02 +01:00
2018-11-22 10:54:38 +01:00
2018-11-28 10:10:09 +09:00
2018-11-22 10:54:38 +01:00
2018-11-26 22:40:51 +09:00
2018-07-25 10:23:22 +02:00
2018-07-26 10:16:25 +02:00
2018-07-26 10:16:25 +02:00
2018-07-25 10:23:22 +02:00
2018-11-22 10:54:38 +01:00
2018-11-22 10:54:38 +01:00
2018-11-22 10:54:38 +01:00
2018-11-22 10:54:38 +01:00
2018-11-22 10:54:38 +01:00
2018-11-27 15:24:07 +01:00
2018-11-22 10:54:38 +01:00
2018-11-20 11:18:22 +01:00
2018-11-28 13:08:19 +09:00
2018-11-23 06:22:30 +09:00
2018-11-26 14:08:46 +01:00
2018-11-28 08:38:55 +01:00
2018-11-22 10:54:38 +01:00
2018-11-23 06:22:30 +09:00
2018-11-22 10:54:38 +01:00
2018-11-20 11:18:22 +01:00
2018-11-22 10:54:38 +01:00
2018-11-21 13:40:24 +01:00
2018-11-22 10:54:38 +01:00
2018-11-27 12:20:19 +01:00
2018-11-23 06:22:30 +09:00
2018-11-21 13:40:24 +01:00
2018-11-28 08:38:55 +01:00
2018-11-23 06:22:30 +09:00
2018-11-23 06:22:30 +09:00
2018-11-22 10:54:38 +01:00
2018-11-22 10:54:38 +01:00
2018-11-22 10:54:38 +01:00
2018-11-27 10:12:27 +01:00
2018-11-23 06:22:30 +09:00
2018-11-23 06:22:30 +09:00
2018-11-22 10:54:38 +01:00
2018-11-22 00:59:24 +01:00
2018-11-23 06:22:30 +09:00
2018-11-22 10:54:38 +01:00