diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-01-22 17:05:38 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-01-22 17:08:27 +0100 |
commit | 407e79aca5cc2caadb9c9a916fcb91c3e9f3c244 (patch) | |
tree | 5f2474b997452fb9a66ca2d4519eabed1d205dfb /src/include/gnunet_json_lib.h | |
parent | e22c9d7e579210f39008923937e15b45fb226319 (diff) | |
download | gnunet-407e79aca5cc2caadb9c9a916fcb91c3e9f3c244.tar.gz gnunet-407e79aca5cc2caadb9c9a916fcb91c3e9f3c244.zip |
implement boolean json spec
Diffstat (limited to 'src/include/gnunet_json_lib.h')
-rw-r--r-- | src/include/gnunet_json_lib.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/include/gnunet_json_lib.h b/src/include/gnunet_json_lib.h index c12badcd9..49120982a 100644 --- a/src/include/gnunet_json_lib.h +++ b/src/include/gnunet_json_lib.h | |||
@@ -248,6 +248,16 @@ struct GNUNET_JSON_Specification | |||
248 | GNUNET_JSON_spec_uint64 (const char *name, | 248 | GNUNET_JSON_spec_uint64 (const char *name, |
249 | uint64_t *u64); | 249 | uint64_t *u64); |
250 | 250 | ||
251 | /** | ||
252 | * Boolean (true mapped to GNUNET_YES, false mapped to GNUNET_NO). | ||
253 | * | ||
254 | * @param name name of the JSON field | ||
255 | * @param[out] boolean where to store the boolean found under @a name | ||
256 | */ | ||
257 | struct GNUNET_JSON_Specification | ||
258 | GNUNET_JSON_spec_boolean (const char *name, | ||
259 | int *boolean); | ||
260 | |||
251 | 261 | ||
252 | /* ************ GNUnet-specific parser specifications ******************* */ | 262 | /* ************ GNUnet-specific parser specifications ******************* */ |
253 | 263 | ||