This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS: exact JSON format for GUI Composer HTTP binding.

Tool/software: Code Composer Studio

Team, 

Am trying to work out exactly the format of the HTTP binding in GUI composer. 

For example I see that - dev.ti.com/components/gc/1.7/version.json - works. 

But this JSON test page doesnt. https://www.jsontest.com/

For example -  

Thanks !

  • I have requested a GUI Composer expert to take a look and respond. It may take a day or two though as they are out of the office today. Thank you for your patience.

  • Hi Notozman,

    The link for www.jsontest.com does not return a JSON object. Where ../gc/1.7/version.json returns a JSON object. 

    As long as a HTTP GET request returns a JSON object, GUI Composer should be able to provide databind to the widgets.

    Regards,
    Patrick

  • Patrick - if you look at the example I provided - I am testing a link on that page ..

    headers.jsontest.com

    which returns below - but is not comprehended by GC.

    {
    "X-Cloud-Trace-Context": "5502ab6c9e5c00d1c1eda1a460cba2f3/4707970580915789633",
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
    "Upgrade-Insecure-Requests": "1",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36",
    "Host": "headers.jsontest.com",
    "Accept-Language": "en-US,en;q=0.9",
    "Via": "1.1 192.91.60.14 (McAfee Web Gateway 7.8.2.3.0.26967)"
    }
  • Notozman,
    I was able to reproduce your problem earlier today, but for the last couple hours, I have been getting a "503 Over Quota" error from headers.jsontest.com as well as all the other services on jsontest.com.

    I've tried some other http test servers such as http://httpbin.org/headers but have been unable to see the same issue.

    Are you developing a GUI Composer application that uses jsontest.com? Or are you seeing the same error with your own custom server?
    As Patrick mentioned, as long as your server returns JSON (response content-type should be "application/json"), GUI Composer should correctly parse this data.

    Newton
  • Newton,

    I have similar issues with my own embedded linux server with python JSON encoder on a beagle bone that is displaying wireless node activities, GC makes the GET OK but cannot parse the JSON code. So I picked a JSON test site as above - and see the same issue. I see the same as you - it is over quota right now.
  • The website seems to be back up again for you to debug. thanks.
  • Notozman,
    After debugging the issue, it seems that there is a bug with the http request that GUI Composer's proxy is sending to the target server.
    Specifically, the "host" in the request headers seems to be incorrect. I have filed a bug (GC-1700) to fix this.

    As to why some pages work (httpbin.org) while others do not (jsontest.com), my guess is that for some sites, a proxy is checking the "host" request header and responding with a 404 if the "host" is incorrect. In the case of jsontest.com, the "host" must be "headers.jsontest.com" otherwise a 404 is responded.

    For a temporary workaround in your case, I would suggest investigating whether you are using any proxies that might be checking the "host" in the request headers and to avoid checking that until the fix for GC-1700 is published.