You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My feature-request is to add an option to force keeping the array also for single values to normalize the whole xml. An option with the default value false to keep the current behavior as prefered behavior.
The new option could be named doNotUnwrapSingleValue or something like this. The export for single values in xml should result in this json:
{
"complies": {
"standard": ["STD1"]
}
}
Why?
Because every node has the same structure.
Note:
This does not affect the root node. The root node never have multiple values. (tested in xml2js)
What do you think about my suggestion?
fast-xml-parser version: 3.12.20
The text was updated successfully, but these errors were encountered:
Domvel
changed the title
feat(xml-parser) Option for "Do not reduce values. Keep arrays."
feat(xml-parser) Option for, do not unwrap single values. Keep arrays.
Sep 2, 2019
I close it, because it's not important at this moment. I like the current behavior. And it will come to late. I have to adapt it to the last xml-parsers behavior. (xml2js)
But feel free to re-open this issue if you want this feature.
fast-xml-parser parses the xml in an intelligent way. This is awesome. See these examples:
XML with multiple values:
in json:
XML with single value:
in json:
My feature-request is to add an option to force keeping the array also for single values to normalize the whole xml. An option with the default value
false
to keep the current behavior as prefered behavior.The new option could be named
doNotUnwrapSingleValue
or something like this. The export for single values in xml should result in this json:Why?
Because every node has the same structure.
Note:
This does not affect the root node. The root node never have multiple values. (tested in xml2js)
What do you think about my suggestion?
fast-xml-parser
version:3.12.20
The text was updated successfully, but these errors were encountered: