Replies: 1 comment
-
Fixed by #101 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I couldn't find any option to preserve whitespace for doc.end or convert functions, so I thought I'd try here.
In my xmlString, there's a property containing only whitespace values.
XML:
<ValueWithBlankSpaces> </ValueWithBlankSpaces>
When I convert it to JSON using doc.end() or convert(), the value becomes an empty object.
const doc = create(xmlString);
const jsonString = doc.end({ format: "json" });
JSON:
"ValueWithBlankSpaces": {}
Is there an option I can use to preserve the whitespace(s)?
Beta Was this translation helpful? Give feedback.
All reactions