Module: kamailio Branch: master Commit: 8926698e92675d712db318c335f30d4f43f1a53d URL: https://github.com/kamailio/kamailio/commit/8926698e92675d712db318c335f30d4f43f1a53d
Author: Kamailio Dev <kamailio....@kamailio.org> Committer: Kamailio Dev <kamailio....@kamailio.org> Date: 2018-03-02T15:31:30+01:00 modules: readme files regenerated - json ... [skip ci] --- Modified: src/modules/json/README --- Diff: https://github.com/kamailio/kamailio/commit/8926698e92675d712db318c335f30d4f43f1a53d.diff Patch: https://github.com/kamailio/kamailio/commit/8926698e92675d712db318c335f30d4f43f1a53d.patch --- diff --git a/src/modules/json/README b/src/modules/json/README index 1f17cb328b..1bc0c1112c 100644 --- a/src/modules/json/README +++ b/src/modules/json/README @@ -26,13 +26,15 @@ Matthew Williams 3. Functions 3.1. json_get_field(json_string, field_name, destination) + 3.2. json_get_string(json_string, field_name, destination) 4. Transformations List of Examples 1.1. json_get_field usage - 1.2. json.parse usage + 1.2. json_get_string usage + 1.3. json.parse usage Chapter 1. Admin Guide @@ -47,6 +49,7 @@ Chapter 1. Admin Guide 3. Functions 3.1. json_get_field(json_string, field_name, destination) + 3.2. json_get_string(json_string, field_name, destination) 4. Transformations @@ -76,6 +79,7 @@ Chapter 1. Admin Guide 3. Functions 3.1. json_get_field(json_string, field_name, destination) + 3.2. json_get_string(json_string, field_name, destination) 3.1. json_get_field(json_string, field_name, destination) @@ -94,12 +98,23 @@ json_get_field("{'foo':'bar'}", "foo", "$var(foo)"); xlog("foo is $var(foo)"); ... +3.2. json_get_string(json_string, field_name, destination) + + Copy field 'field_name' from json object 'json_string' and store it in + pvar 'destination'. + + Example 1.2. json_get_string usage +... +json_get_string("{'foo':'bar'}", "foo", "$var(foo)"); +xlog("foo is $var(foo)"); +... + 4. Transformations You can use the transformation to extract values from the json structured pseudo-variables * json - Example 1.2. json.parse usage + Example 1.3. json.parse usage ... # extract value of "Custom-Data" from $rb pseudo-variable and set it to $var(Custom-Data) _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev