Skip to content

For two the correct xml structure. Is it possible to create a root element for one element? #636

Answered by javadev
operlay asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @operlay,

Thank you for the question.

You may add "root" to the json

{ "root":
{
	"arrays": [
		{
			"sap_id": 2978
		}
	]
}
}

will be converted to

<?xml version="1.0" encoding="UTF-8"?>
<root>
   <arrays array="true">
      <sap_id number="true">2978</sap_id>
   </arrays>
</root>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by javadev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants