# JSON to XML. xml truncated

**URL:** https://discourse.nodered.org/t/json-to-xml-xml-truncated/33448
**Category:** General
**Created:** [28 September 2020 13:31 UTC](https://discourse.nodered.org/t/json-to-xml-xml-truncated/33448 "2020-09-28T13:31:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![crester](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crester/32/21997_2.png) [@crester](https://discourse.nodered.org/u/crester)
#### Post date: [28 September 2020 13:31 UTC](https://discourse.nodered.org/t/json-to-xml-xml-truncated/33448/1 "2020-09-28T13:31:57Z")

</div>

Hello  
I am trying to convert a JSON string to XML  
but it doesn't work  
I haven't good knowledge of JSON nor XML but when I parse this string, the XML truncates at last and I am unable to find out what is the problem  
Some help or tips will be very appreciated.  
Thanks  
This is the JSON

```auto
{
    "rootId": "AXTU4xmJ2Pwf5M61uHKD",
    "requestId": "3c5d6bc431e5e144:e6dc8c5:174d46b5d5e:-8000:226",
    "details": {
        "owner": "admin",
        "severity": 1,
        "flag": false,
        "customFields": {},
        "description": "Possible Malware Threat",
        "title": " Possible Malware threat",
        "tags": [
            "CYC",
            "low",
            "Possible Malware threat"
        ],
        "caseId": 36,
        "tlp": 3,
        "metrics": {},
        "pap": 2,
        "startDate": 1587977329785,
        "status": "Open"
    },
    "operation": "Creation",
    "objectId": "AXTU4xmJ2Pwf5M61uHKD",
    "startDate": 1601299488122,
    "objectType": "case",
    "base": true,
    "object": {
        "severity": 1,
        "owner": "admin",
        "_routing": "AXTU4xmJ2Pwf5M61uHKD",
        "flag": false,
        "customFields": {},
        "_type": "case",
        "description": "Possible Malware Threat CREDITOCAUCION Correlation Engine",
        "title": " Possible Malware threat",
        "tags": [
            "CYC",
            "low",
            "Possible Malware threat"
        ],
        "createdAt": 1601299487021,
        "_parent": null,
        "createdBy": "admin",
        "caseId": 36,
        "tlp": 3,
        "metrics": {},
        "_id": "AXTU4xmJ2Pwf5M61uHKD",
        "id": "AXTU4xmJ2Pwf5M61uHKD",
        "_version": 1,
        "pap": 2,
        "startDate": 1587977329785,
        "status": "Open"
    }
}

```

and this is the resulted xml.  
as you can see, at the end it is truncated

```auto
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
	<rootId>AXTU4xmJ2Pwf5M61uHKD</rootId>
	<requestId>3c5d6bc431e5e144:e6dc8c5:174d46b5d5e:-8000:226</requestId>
	<details>
		<owner>admin</owner>
		<severity>1</severity>
		<flag>false</flag>
		<customFields/>
		<description>Possible Malware Threat</description>
		<title> Possible Malware threat</title>
		<tags>CYC</tags>
		<tags>low</tags>
		<tags>Possible Malware threat</tags>
		<caseId>36</caseId>
		<tlp>3</tlp>
		<metrics/>
		<pap>2</pap>
		<startDate>1587977329785</startDate>
		<status>Open</status>
	</details>
	<operation>Creation</operation>
	<objectId>AXTU4xmJ2Pwf5M61uHKD</objectId>
	<startDate>1601299488122</startDate>
	<objectType>case</objectType>
	<base>true</base>
	<object>
		<severity>1</severity>
		<owner>admin</owner>
		<_routing>AXTU4xmJ2Pwf5M61uHKD</_routing>
		<flag>false</flag>
		<customFields/>
		<_type>case</_type>
		<description>Possible Malware Threat CREDITOCAUCION Correlation Engine</description>
		<title> Possible Malware threat</title>
		<tags>CYC</tags>
		<tags>low</tags>
		<tags>Possible Mal...

```

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [28 September 2020 13:40 UTC](https://discourse.nodered.org/t/json-to-xml-xml-truncated/33448/2 "2020-09-28T13:40:51Z")

</div>

Hi @crester

The Debug sidebar truncates the data it is asked to display so it doesn't end up trying to send too much to the browser. That does not mean the value itself is truncated in the runtime.

If you configure the Debug node to also write to the system console, you should be able to confirm the data is all there. Or add a File node to write it to a file.

---

<div class="post-metadata">

### Author: ![crester](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crester/32/21997_2.png) [@crester](https://discourse.nodered.org/u/crester)
#### Post date: [28 September 2020 14:34 UTC](https://discourse.nodered.org/t/json-to-xml-xml-truncated/33448/3 "2020-09-28T14:34:36Z")

</div>

absolutely right  
thank you

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [27 November 2020 14:34 UTC](https://discourse.nodered.org/t/json-to-xml-xml-truncated/33448/4 "2020-11-27T14:34:43Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
