[sr-dev] git:master:9465064d: kazoo : add json keys function and escape character

Luis Azedo luis.azedo at factorlusitano.com
Wed Jun 10 13:33:13 CEST 2015


Module: kamailio
Branch: master
Commit: 9465064d3913bcd061aaa280adb4366d9a4c5a52
URL: https://github.com/kamailio/kamailio/commit/9465064d3913bcd061aaa280adb4366d9a4c5a52

Author: Luis Azedo <luis.azedo at factorlusitano.com>
Committer: Luis Azedo <luis.azedo at factorlusitano.com>
Date: 2015-06-10T12:12:34+01:00

kazoo : add json keys function and escape character

json in the form of

{ "Nodes" :  {
       "mynode at my.tld.com" : { ... },
       "myothernode at my.tld.com" : { ...}
       }
}

doesn't have an easy to fetch the keys (it works already if it is an array)
kazoo_json_keys retrieves the keys to an avp

when querying inner fields in the form xx.yy.zzz
if one of xx / yy / zzz contains a dot (.) we cannot determine the field correctly.
use "json_escape_char" param value to encode the value before querying json and kazoo_json will decode using the same character

---

Modified: modules/kazoo/kazoo.c
Modified: modules/kazoo/kz_json.c
Modified: modules/kazoo/kz_json.h

---

Diff:  https://github.com/kamailio/kamailio/commit/9465064d3913bcd061aaa280adb4366d9a4c5a52.diff
Patch: https://github.com/kamailio/kamailio/commit/9465064d3913bcd061aaa280adb4366d9a4c5a52.patch




More information about the sr-dev mailing list