Has anyone got any information in regards to conve...
# suitescript
k
Has anyone got any information in regards to converting XML to JSON in NetSuite? I am currently using a couple of dirty functions. I have had a google and can use those but would love if anyone has a way to convert from XML to JSON using an XSD to keep the format etc.
b
there are a bunch you can find in npm under the xml keyword
most of the popular ones required a bundler like browserify to change the module format
s
the most powerful one I've seen, which also has code generation capabilities if you have XSDs, is JSONIX.
k
Yeah I looked at that but it mentions using Java which I suppose would be ok to generate it in webstorm before uploading the file cabinet. Just need to try it out when I have a spare couple of days.
s
aye, though you're already involved with java - webstorm is a java app, and the SDF cli requires commandline java to be available as well.
though I vaguely recall needing to tweak the java command a bit for JSONIX map generation, depending on what version of java you have. I recommend having multiple versions of java installed such that switching between them is easy.