MCPcopy Create free account
hub / github.com/apache/httpd / md_json_sets_dict

Function md_json_sets_dict

modules/md/md_json.c:668–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666}
667
668apr_status_t md_json_sets_dict(apr_table_t *dict, md_json_t *json, ...)
669{
670 json_t *nj, *j;
671 va_list ap;
672
673 va_start(ap, json);
674 j = jselect(json, ap);
675 va_end(ap);
676
677 if (!j || !json_is_object(j)) {
678 const char *key;
679
680 va_start(ap, json);
681 j = jselect_parent(&key, 1, json, ap);
682 va_end(ap);
683
684 if (!key || !j || !json_is_object(j)) {
685 return APR_EINVAL;
686 }
687 nj = json_object();
688 json_object_set_new(j, key, nj);
689 j = nj;
690 }
691
692 apr_table_do(object_set, j, dict, NULL);
693 return APR_SUCCESS;
694}
695
696/**************************************************************************************************/
697/* conversions */

Callers

nothing calls this directly

Calls 2

jselectFunction · 0.85
jselect_parentFunction · 0.85

Tested by

no test coverage detected