Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

namespace url does not properly convert from json to xml #22

Closed
GoogleCodeExporter opened this issue Nov 9, 2015 · 3 comments
Closed

Comments

@GoogleCodeExporter
Copy link

Problem:

Namespace url http://www.example.org turns to http:://www.example.org 
when converting from JSON to XML.


What steps will reproduce the problem?

1. Run the the x2js html sample using the sample json:

{"MyOperation":{"test":"Success","test2":{"item":["ddsfg","dsdgfdgfd"],"item2":"
testArrSize","_myAttr":"SuccessAttrValueTest2"},"_xmlns:testns":"http:://www.exa
mple.org","__prefix":"testns"}}


What is the expected output? 

<testns:MyOperation 
xmlns:testns='http://www.example.org'><test>Success</test><test2 
myAttr='SuccessAttrValueTest2'><item>ddsfg</item><item>dsdgfdgfd</item><item2>te
stArrSize</item2></test2></testns:MyOperation>


What do you see instead?

<testns:MyOperation 
xmlns:testns='http::&#x2F;&#x2F;www.example.org'><test>Success</test><test2 
myAttr='SuccessAttrValueTest2'><item>ddsfg</item><item>dsdgfdgfd</item><item2>te
stArrSize</item2></test2></testns:MyOperation>


What version of the product are you using? On what operating system and
browser version?

x2js v 1.1.5
Chrome v 33.0.1750.117
OS X 10.9.1


Original issue reported on code.google.com by jc.ferre...@gmail.com on 2 Mar 2014 at 12:51

@GoogleCodeExporter
Copy link
Author

Original comment by abdulla....@gmail.com on 2 Mar 2014 at 10:13

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Fixed in v1.1.6
Available at https://x2js.googlecode.com/hg/xml2json.js (in mercurial).
Thanks for the report!

Original comment by abdulla....@gmail.com on 2 Mar 2014 at 10:24

@GoogleCodeExporter
Copy link
Author

Original comment by abdulla....@gmail.com on 2 Mar 2014 at 10:24

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant