Search code examples
jsonironpythonspotfire

Parse json file with ironpython 2.5


I am using IronPython 2.5 (inside TIBCO Spotfire) and would like to parse a json file.

The json library is not available in this version of IronPython. simplejson doesn't work either. Is there another library i can use for this? It can be .Net or Python, doesn't matter.

Thanks in advance!


Solution

  • I figured it out...

    convert the json string to a dictionary:

    jsonstring = open('myfile.json').read()
    data = eval(jsonstring)