static double GetJsonFloat(KonohaContext *kctx, struct JsonBuf *jsonbuf, const char *key, size_t keylen_or_zero, double defval) { JSON json = AsJSON(jsonbuf); if(key == NULL) return JSONDouble_get(json); return JSON_getDouble(json, key, KeyLen(key, keylen_or_zero)); }
static double GetJsonFloat(KonohaContext *kctx, struct JsonBuf *jsonbuf, const char *key, size_t keylen_or_zero, double defval) { if(key == NULL) JSONDouble_get(toJSON(jsonbuf->json_i)); return JSON_getDouble(toJSON(jsonbuf->json_i), key, KeyLen(key, keylen_or_zero)); }