Issue serializing sequences that are members of an array
See original GitHub issueEvaluating any of the following in FontoXPath
[(1,2)]
[[1,2]?*]
array:append([], (1,2))
Expected
Evaluates to an array with a sequence; [(1,2)]
Actual
Returns an error “Serialization error: The value of an entry in an array is expected to be a singleton sequence.”
Testlink:
It may even be represented correctly in the AST but cannot be serialised.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
AXIS array serialization: Incorrect element names of items in a ...
AXIS array serialization: Incorrect element names of items in a list. Status: Assignee: Priority: Resolution: Open. Unassigned. Critical.
Read more >How to serialize duplicate XML elements into an array?
I'm attempting to serialize some poorly formatted XML. I'm specifically having issues converting duplicate elements into an array. In usual ...
Read more >serializing a json array using {} instead of [] · Issue #373 - GitHub
I noticed that when array have empty element (like yours [ ]) it is serialized with the indexes. Maybe you have some empty...
Read more >Controlling XML Serialization Using Attributes - Microsoft Learn
Attributes can be used to control the XML serialization of an object or to create an alternate XML stream from the same set...
Read more >Serialization of Classes - Boost C++ Libraries
a class member function serialize; a global function serialize ... it is a reference to a Serializable type. it is a native C++...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I improved the error message a bit, It was lying a bit since non-singleton sequences are sometimes valid (in the case of the empty sequence, which is converted to
null
).While I like your suggestion for a more raw output format, I am afraid it will get too explicit too fast. I will keep it in the back of my mind though because it might be very valuable in the playground. I hope no one will want to process it in their own production application that depends on FontoXPath.
I’ll close this issue when the error messages PR is integrated. Thanks for bringing this to our attention!
Regards,
Martin
Thanks for taking it into consideration. I understand that it might be out of scope and there is a valid way to get there by explicitly wrapping a sequence in
array {}
.