Open svarzee opened 3 years ago
Running: xml-to-json-fast <<< '<tag>some text 
 some text</tag>' Yields:
xml-to-json-fast <<< '<tag>some text 
 some text</tag>'
{"name": "tag", "items": [ "some text some text" ]}
Which is incorrect json, it should be:
{"name": "tag", "items": [ "some text \n some text" ]}
The same applies to \t
Fix in StreamingXmlToJson.hs
57 encodeStrInternal ('\n':s) = '\\':'n': encodeStrInternal s 58 encodeStrInternal ('\t':s) = '\\':'t': encodeStrInternal s
Running:
xml-to-json-fast <<< '<tag>some text 
 some text</tag>'
Yields:Which is incorrect json, it should be: