Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

My first npm package

Hi guys, I found myself at work having to convert some xml files to json files on the fly. There were some existing npm packages out there but a lot of them required a lot of configuration and did not produce results I was expecting.

I therefore thought I give it a shot at trying to come up with a simple package that does one thing and one thing only. Convert XML to JSON. My goal was to have the JSON reflect the XML structure as close as possible as that was one of the short comings of some of the existing packages out there.

It currently supports a streaming mode and a regular callback style api function.

Let me know what you think and perhaps how it can be improved! :)

xml-to-json-stream https://www.npmjs.com/package/xml-to-json-stream