Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support for XML in JSON, and XML in binary.
This isn't strictly speaking in the spec, but I skip whitespace when parsing the base64 string. The reason for this is that it is super common in XML (at least) to assume that whitespace is ignored, even the base nodeset does this, though the XML standard does include whitespace in text bodies, so it's technically wrong, but we are better off ignoring it, even at a small performance penalty.
Apart from that this also changes JSON extension objects to use
UaTypeId
andUaBody
, as this is how it is in the spec (part 6 5.4.2.16).I believe we are slightly too conservative in skipping errors in extension objects, which we may be supposed to do, technically. In order to do so better we should create "fallback" types that allow storing raw data in an extension object. This would also make it possible to encode extension objects as other types manually, if you want that for some reason.
I'll be honest and say I don't see a ton of use for these, but completeness is valuable when it comes to encoding/decoding.