Module: kamailio Branch: 4.3 Commit: 5d1fe9db6ef3da2d349a1b77bd441eda19ff7aa0 URL: https://github.com/kamailio/kamailio/commit/5d1fe9db6ef3da2d349a1b77bd441eda19ff7aa0
Author: kelchy <kel...@bitbucket.org> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2015-07-17T12:25:39+02:00 prevent jansson from shuffling key order in json (cherry picked from commit 140d0c6fc89d3c72bbd45627ca627e19e45b4e53) --- Modified: modules/jansson/jansson_utils.c --- Diff: https://github.com/kamailio/kamailio/commit/5d1fe9db6ef3da2d349a1b77bd441eda19ff7aa0.diff Patch: https://github.com/kamailio/kamailio/commit/5d1fe9db6ef3da2d349a1b77bd441eda19ff7aa0.patch --- diff --git a/modules/jansson/jansson_utils.c b/modules/jansson/jansson_utils.c index 85f87ad..4919b0e 100644 --- a/modules/jansson/jansson_utils.c +++ b/modules/jansson/jansson_utils.c @@ -33,7 +33,7 @@ int jansson_to_val(pv_value_t* val, char** freeme, json_t* v) { val->flags = 0; if(json_is_object(v) || json_is_array(v)) { - const char* value = json_dumps(v, JSON_COMPACT); + const char* value = json_dumps(v, JSON_COMPACT|JSON_PRESERVE_ORDER); *freeme = (char*)value; val->rs.s = (char*)value; val->rs.len = strlen(value); _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev