X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server%2Ffastcgi.c;h=49bf19716246643484797d8757af349c5d496354;hb=21cbb2cee0b59d9d1d366fcdfaba7689875003ca;hp=592261672b09cfe6d73052d6b9834a93a93f5516;hpb=ed21599957130173a661904f22e50af59a96a6ac;p=matches%2FMCTX3420.git diff --git a/server/fastcgi.c b/server/fastcgi.c index 5922616..49bf197 100644 --- a/server/fastcgi.c +++ b/server/fastcgi.c @@ -213,6 +213,16 @@ void FCGI_JSONDouble(const char *key, double value) printf(",\r\n\t\"%s\" : %f", key, value); } +/** + * Similar to FCGI_JsonPair except for boolean values. + * @param key The key of the JSON entry + * @param value The value associated with the key + */ +void FCGI_JSONBool(const char *key, bool value) +{ + printf(",\r\n\t\"%s\" : %s", key, value ? "true" : "false"); +} + /** * Begins a JSON entry by writing the key. To be used in conjunction * with FCGI_JsonValue.