| 666 | } |
| 667 | |
| 668 | apr_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 */ |
nothing calls this directly
no test coverage detected