Hi all!

I have a few XML documents, whose content I would also like to provide in JSON. 
The XML files contain many strings encoded within comments, such as 
<!--incipit—>, and I would like to transfer such string contents unchanged into 
JSON. However, I am having a hard time to deal with  “&#45;” ( using 
data(<!--&#45;—>) ), which is rendered as “&amp;45;” , and “>”, which is 
translated into “&gt;”: I tried a lot, but nothing seems to work: is there a 
way to keep “&#45;”  and “>” unchanged while serializing to JSON?

Another issue I am experiencing is that, after JSON serialization, the order of 
the key-values in a map does not follow that specified in my code: I know that 
the order is not computationally meaningful, but for reading purposes it would 
make a huge difference in my case, because one key contains a long array of 
objects and therefore I would like the keys with shorter contents to be 
serialized before. 

Ciao,
Giuseppe




Reply via email to