Closed fish9370 closed 4 years ago
There exists a featureful standard for the syntax of the "keys" argument in your example, called json-path: https://goessner.net/articles/JsonPath/ ... but that is quite a lot of functionality, which probably will not be implemented in jansson any time soon.
However, jansson already has a different function which can give you convenient nested access, json_unpack()
json_t *res = NULL;
int err = json_unpack(json, "{s:{s:o}}", "sip", "expires", &res);
// check err, then use res
Hello, can you add new method for nested query?
using:
json_t *expires = json_object_get_nested(conf, "sip expires")
it's return NULL if not found