HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: dutchie on May 13, 2014, 08:46:50 PM

Title: Convert XML to JSON
Post by: dutchie on May 13, 2014, 08:46:50 PM
How can I convert http://www.pepper1.net/zwavedb/device/124/124-0060-0001-0002-06-02-40-01-02.xml (http://www.pepper1.net/zwavedb/device/124/124-0060-0001-0002-06-02-40-01-02.xml) to 0060_001_002.json
Title: Re: Convert XML to JSON
Post by: Gene on May 13, 2014, 09:05:01 PM
pepperdb has been updated in r372:

http://sourceforge.net/projects/homegenie/files/testing/ (http://sourceforge.net/projects/homegenie/files/testing/)

you can find this file as well.

g.
Title: Re: Convert XML to JSON
Post by: dutchie on May 13, 2014, 09:45:32 PM
I used the all_deb version and all the programs and devices are undefined

*edit
HG up and running again (r372) but I don't notice anything about the specific file I want.
Am I doing something wrong?
Title: Re: Convert XML to JSON
Post by: naps1saps on July 01, 2015, 03:33:48 AM
Found this site.  Seems to do the trick.  Just add the xml data at the top I guess...  Maybe Gene can chime in.
http://codebeautify.org/xmltojson (http://codebeautify.org/xmltojson)
Title: Re: Convert XML to JSON
Post by: stefbrodu on September 26, 2015, 03:30:38 PM
This one too : http://www.freeformatter.com/xml-to-json-converter.html#ad-output (http://www.freeformatter.com/xml-to-json-converter.html#ad-output)
That allows you to set some formatting options.
But same remark : need to add some xml data stuff at the top of the file.