Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    The reason for this is that the API that you are using is not directly returning JSON code that TablePress can understand, and it’s actually even wrapping the JSON code in a JavaScript callback function (so-called JSONP).

    TablePress can only understand a certain JSON format, i.e. JSON-encoded two-dimensional arrays. APIs like the one you are using however return custom object-based results, which are not directly compatible, unfortunately 🙁

    Regards,
    Tobias

    Thread Starter therber2

    (@therber2)

    Ah darn. Well thanks for the response Tobias.

    I am trying to pull a live updating chart from that api. Do you have any suggestions on how I might do that?

    If not, no worries.

    All the best,
    Tom

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Tom,

    not really, sorry 🙁 Unless you can influence what that API returns, you will need some sort of intermediate layer on your server (like a custom PHP script) that converts the returned API JSON code to a suitable JSON code for the import as a table.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Import from JSON Error’ is closed to new replies.