highsource / highsource/jsonix
Using default namespaces on nested elements fails to unmarshal
- Dominant language
- JavaScript
- Stars
- 369
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I generated bindings for the EDXL-SitRep schema and tried parsing one of the examples which fails giving me this error:
`VM136 Jsonix-all.js:2329 Uncaught Error: Illegal state: must be END_ELEMENT.
at Class.unmarshal (VM136 Jsonix-all.js:2329)
at Class.unmarshalElement (VM136 Jsonix-all.js:1964)
at Class.unmarshal (VM136 Jsonix-all.js:3019)
at Class.unmarshalProperty (VM136 Jsonix-all.js:2335)
at Class.unmarshal (VM136 Jsonix-all.js:2292)
at Class.unmarshalElement (VM136 Jsonix-all.js:1964)
at Class.unmarshalDocument (VM136 Jsonix-all.js:2101)
at Class.unmarshalString (VM136 Jsonix-all.js:2060)
at VM775:230
at dispatch (VM101 jquery-2.1.3.js:4430)`
I suspect that it has something to do with the usage of default namespaces and have created a fiddle (https://jsfiddle.net/8ugmzzy0/) demonstrating the issue.
There is an example that works, because I added an additional default namespace declaration on the 'Report' element. Though, I believe it should work without it, as in the example that fails to unmarshal.
Thanks in advance!
Simon
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.