• Resolved mjif2

    (@mjif2)


    I’ve searched for an answer to this and haven’t found it.

    I am trying to upload data from a json feed at http://llagentri.org/Survey/AdvancedSearch?type=json&ids=3;156; (this link needs the semicolon at the end) into Tablepress on my WordPress site.

    It seems that the problem is that it is not a simple array. There is additional information pertaining to query terms bounding the actual two-dimensional data array that I want.

    I’m guessing that there is a Custom Command that I can add to the JS call through the DataTables JavaScript library, but I can’t figure out what it would be. Can you help?

    https://ww.wp.xz.cn/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    You are totally correct here. The reason why you are having problems with importing this, is that this JSON code is not a simple array. TablePress however requires that format. Unfortunately, a Custom Command for the DataTables JS library will not influence that in any way, as that library has nothing to do with the import.

    Now, in the the current developer version of TablePress, I’ve added some code that makes the JSON import more robust, in the sense that more sophisticated JSON code (e.g. encoded objects) can (sometimes) be imported.
    You might want to try that, by installing the developer version from http://tablepress.org/download/tablepress-dev.zip

    If that does not work, your only chance is to re-format that JSON code before the import.

    Regards,
    Tobias

    Thread Starter mjif2

    (@mjif2)

    Tobias, thank you for your quick response! I will download and install the developer version tomorrow morning and report back here.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    sounds good! I hope this helps!

    Regards,
    Tobias

    Thread Starter mjif2

    (@mjif2)

    Thanks, Tobias, but tablepress-dev doesn’t work either. Like Tablepress, it reads the first part of the feed and then errors out on the actual JSON data. I love the functionality of Tablepress but I think I’m going to have to either (a) get our developer to change the structure of the feed or (b) come up with a different method of rendering it.

    Regards,

    Mary Jo Feeney

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    ah, bummer. Sorry to hear that this didn’t work.
    If this is tabular data, method (a) should indeed be the easiest way here, if that’s possible on the API side.

    Best wishes,
    Tobias

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

The topic ‘JSON Header Data Causing Import Problems’ is closed to new replies.