Closed Undefined01 closed 4 months ago
We're glad you find this project helpful. We'll try to address this issue ASAP. You can vist https://solothought.com to know recent features. Don't forget to star this repo.
Setting suppressBooleanAttributes
to false
solves this problem.
I think it is kind of unintuitive. It's odd that {"@_Property": "true"}
gets treated as a boolean attribute and suppressed, yet {"@_Property": false}
and {"@_Property": "false"}
are not affected in the same way. Besides, I would expect they will not be regarded as boolean attributes and suppressed after setting allowBooleanAttributes
to false.
设置为 可解决此问题。
suppressBooleanAttributes``false
我认为这有点不直观。奇怪的是,它被视为 boolean 属性并被抑制,但 并且没有以相同的方式受到影响。此外,我希望它们不会被视为布尔属性并在设置为 false 后被抑制。
{"@_Property": "true"}``{"@_Property": false}``{"@_Property": "false"}``allowBooleanAttributes
is worked ,thanks
Description
When using XMLBuilder to serialize attributes with the string value "true", they are incorrectly serialized as Boolean attributes, regardless of the Allow Boolean Attributes option's state. This results in an output where the attribute appears without an explicit value, which differs from the expected behavior where the attribute should explicitly show "true". ### InputCode
Output
expected data
Would you like to work on this issue?
Bookmark this repository for further updates. Visit SoloThought to know about recent features.