jsonix icon indicating copy to clipboard operation
jsonix copied to clipboard

Using default namespaces on nested elements fails to unmarshal

Open Simon-Hohberg opened this issue 8 years ago • 1 comments
trafficstars

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

Simon-Hohberg avatar May 17 '17 10:05 Simon-Hohberg

Interesting. Thank you for the test case.

highsource avatar May 17 '17 10:05 highsource