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

Convert both ways. #5

Open
reggi opened this issue Aug 31, 2012 · 12 comments
Open

Convert both ways. #5

reggi opened this issue Aug 31, 2012 · 12 comments

Comments

@reggi
Copy link

reggi commented Aug 31, 2012

This is not a criticism of your work, its great, but just something I don't understand. I'm so confused as to why when someone develops a JSON and XML converter that they don't create the other conversion. So all the community has a JSON to XML parser and a XML to JOSN parser that don't work together. Do you know of any interchangeable parsers? Your library on npm is just xml and it should really be the one that does both.

@TooTallNate
Copy link

I would agree...

@dylang
Copy link
Owner

dylang commented Feb 28, 2013

Great point!

When I built this it seemed like a much easier undertaking than parsing XML. I'm happy to accept review and accept PR for converting arbitrary XML to this project's JSON format.

@tc
Copy link

tc commented Oct 10, 2013

The less ideal solution is to use 2 libs: xml for json to xml and https://github.com/Leonidas-from-XIV/node-xml2js for xml to json converting.

@halfdan
Copy link

halfdan commented Mar 10, 2014

@dylang Is there any work put into this? This library is a lot more compelling to use than node-xml but lacks the ability to parse xml sadly :/

@dylang
Copy link
Owner

dylang commented Mar 10, 2014

I'm not planning on creating an xml parser. I think it would be best to use separate package that's already good that doing that because of the complexity, but I'm happy to accept a pull request that "bridges" this module and a parser to make it trivial to go back and forth.

@talon
Copy link

talon commented Jan 7, 2015

Do One Thing Well™

@buschtoens
Copy link

Do The Things You're Named After™

Do One Thing Well™ would apply if this was named xml-encoder or something similiar. Since this package squats only has the name xml one would assume it does both.

Just how JSON has JSON.stringify() and JSON.parse().

@talon
Copy link

talon commented Jan 7, 2015

I agree the name is misleading.

@ralyodio
Copy link

+1 for converting back to json. I need to compare the outputted xml to inputted json in my unit tests.

@caiosm1005
Copy link

+1

@KaidenP
Copy link

KaidenP commented Mar 8, 2017

I find the name misreading too. You should at least have a notice saying that it only encodes data in the readme

@ozyman42
Copy link

ozyman42 commented Aug 6, 2023

Yeah this lib should not really be named node-xml unless it can do everything the name implies. Too late to change it now though.

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

No branches or pull requests