Closed danieltan closed 12 years ago
Do you have a test case?
Hi Douglas,
Thanks for the quick reply. My simple test case is an XML like below:
In my code, I have an XMLBeans object called thm which I convert to a JSONML object in order to write in my jsp response:
JSONObject json = JSONML.toJSONObject(thm.toString()); String jsonString = json.toString(); req.response.setContentType("application/json"); writer.write(jsonString);
The response I get back is: {"id":"test","xmlns:them":"http://www.idelve.net/xmlbeans/themes","tagName":"xml-fragment","childNodes":[{"tagName":"them:layer-draw-order","childNodes":[">"]}]}
You can note that there is an extra ">" in there from the comment.
Thanks,
Dan
-----Original Message----- From: Douglas Crockford [mailto:reply@reply.github.com] Sent: Monday, 28 May 2012 9:08 PM To: Daniel Tan Subject: Re: [JSON-java] JSONML failing on comments (#56)
Do you have a test case?
Reply to this email directly or view it on GitHub: https://github.com/douglascrockford/JSON-java/issues/56#issuecomment-5965065
Thanks. Please try it now.
That looks great!
Thanks,
Dan
-----Original Message----- From: Douglas Crockford [mailto:reply@reply.github.com] Sent: Wednesday, 30 May 2012 4:43 AM To: Daniel Tan Subject: Re: [JSON-java] JSONML failing on comments (#56)
Thanks. Please try it now.
Reply to this email directly or view it on GitHub: https://github.com/douglascrockford/JSON-java/issues/56#issuecomment-5995206
When using JSONML to convert XML into JSON, there seems to be an issue when encountering comments.
I think the issue is at line 95:
Should there be an else before the x.back(), or maybe the x.back() shouldnt even be in there.