-
correct structure:
Not correct structure:
Is it possible for a root element to be created even with 1 array element? example1:
Need to get structure 1 for json example 1:
Need to get structure 2 for json example 2:
Now the root structure is returned only if there is more than 1 element in the array. Is it possible to specify additional parameters so that if there is 1 element (not an array), the root structure will be returned? |
Beta Was this translation helpful? Give feedback.
Answered by
javadev
Sep 19, 2024
Replies: 1 comment
-
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> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
javadev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @operlay,
Thank you for the question.
You may add "root" to the json
will be converted to