JSON Loader



    I hope I can solve a lot of peoples headache with a better way of loading JSON data.


    This method works by loading the JSON data into an table with a single field, and then placing it into a variable and then converting the value into xml which then is loaded. Works very well but is still a bit for the technical people. I will not provide any support.


    In order to make this work, we need to detect the XML definition after JSON to XML conversion. Open the JSON Loader.qvw Application and the JSON url.


    Copy the JSON output into the vData variable, and click the JSON to XML button. Now take the output in the left side and copy that into a .xml file and load it from qlikview.


    The output script should look similar to this:


    LOAD adminCode3,


    FROM [Desktop\xml.xml] (XmlSimple, Table is [XML/POSTALCODES/TAG]);


    From this we need to extract 2 things. The list of fields (place into vFields), and the XML tree to load (place into vXMLTree).


    In the edit script set the variables based on the above:

    Let vUrl = 'http://api.geonames.org/postalCodeLookupJSON?postalcode=6600&country=AT&username=demo';

    Let vFields = 'adminCode3,adminName2';



    Cross fingers and reload


    Do this for each JSON source.


    Enjoy Torben Seebach 4C Management Consulting