From 4a54efbc46641d69d5280f2af9fdec084adef0af Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Sat, 10 Oct 2020 08:00:01 +0000 Subject: [PATCH] Feature: Include node identification for messages --- src/xml2json.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xml2json.c b/src/xml2json.c index 1550a941..f05ce7b7 100644 --- a/src/xml2json.c +++ b/src/xml2json.c @@ -187,6 +187,8 @@ static void render_node_legacyresponse(json_renderer_t *renderer, xmlDocPtr doc, const char *nodename = (const char *)node->name; handled = 1; if (strcmp(nodename, "iceresponse") == 0) { + json_renderer_begin(renderer, JSON_ELEMENT_TYPE_ARRAY); + handle_node_identification(renderer, "iceresponse", XMLNS_LEGACY_RESPONSE, NULL); json_renderer_begin(renderer, JSON_ELEMENT_TYPE_OBJECT); if (node->xmlChildrenNode) { xmlNodePtr cur = node->xmlChildrenNode; @@ -222,6 +224,7 @@ static void render_node_legacyresponse(json_renderer_t *renderer, xmlDocPtr doc, } while (cur); } json_renderer_end(renderer); + json_renderer_end(renderer); } else if (strcmp(nodename, "modules") == 0) { handled = handle_node_modules(renderer, doc, node, parent, cache); } else {