final notes on attempts to convert XML to JSON in Max

update: this conversion may be built into Max 6.1.7… [js]

For now I am using the following method:

  • Write xml using jit.textfile
  • use aka.shell to convert xml to json using python script xml2json.py (modified header)
  • read the json file in using method in JSON_Readwrite.maxhelp

Its not elegant but it works on the MAC – without installing additional software, like node.js and all of its packages.

update: 3 weeks later. Have been using the above method and also calling curl from aka.shell – writing XML files to /tmp – Then following steps 2 and 3 above. Works fine.

 

 

 

 

Max XML to JSON

update 4/2014 – Max6.1.7 js object now incudes JSON parsing

notes

(update) none of these worked – the solution ended up being a patch from Peter Nyoeber explained elsewhere in this blog…

Looking for a solution to converting xml to json in max

https://gist.github.com/4153569

From this…

http://davidwalsh.name/convert-xml-json

From Stack Overflow – a simple function…

http://stackoverflow.com/questions/7769829/tool-javascript-to-convert-a-xml-string-to-json