• Resolved pmdataframetest

    (@pmdataframetest)


    I have been trying to upload a data table using the url option for a JSON file. When the upload is “successful” I keep getting many lines of the warning below:

    Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/engagemi/public_html/capps/wp-includes/formatting.php on line 3438

    When it goes through, only the very first cell is populated with “JSON”.

    I am retrieving the JSON url from followthemoney.org

    I am not a developer, so very minimal coding/development experience. I have tried updating all the plugins, turning them all off and back on, leaving them all (except tablepress) off, and changing debug to “true” all to no change.

    What I am trying to accomplish is to host a data frame that will automatically update based on the source information.

    I can upload CSVs with no problem whatsoever, but using JSON would be ideal.

    https://wordpress.org/plugins/tablepress/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    The JSON format that TablePress can import has to be in a certain structure. Mainly, it should be a an array of arrays of strings. Things like JSON objects are not supported.
    My assumption here is that the JSON that you get from that website does not follow that structure?

    Regards,
    Tobias

    Thread Starter pmdataframetest

    (@pmdataframetest)

    Thanks for the quick reply. I will have to ask what format the source JSON is in.

    I will get back to you soon, if there is any other pertinent info I should ask – feel free to let me know.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    can you maybe post a link to an example JSON file? That should be sufficient for me to determine if it might be compatible.

    Regards,
    Tobias

    Thread Starter pmdataframetest

    (@pmdataframetest)

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Sean,

    thanks! This is indeed a very complex JSON file that needs individual parsing. This is more than a simple table (i.e. a two-dimensional array), so that this can not be imported directly into TablePress, I’m afraid. Sorry.

    Regards,
    Tobias

    Thread Starter pmdataframetest

    (@pmdataframetest)

    Wuah Wuah.

    Well thanks for all the help. Any suggestions to use this file? I have seen some more complex tutorials, but had hoped to use your plugin.

    Sean

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Sean,

    no, sorry 🙁 You’d need to convert the JSON format from that site to a “simple” table first, or fall back to the CSV format.

    Regards,
    Tobias

    Thread Starter pmdataframetest

    (@pmdataframetest)

    Tobias,

    CSV will have to do then.

    Best,
    Sean

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yeah, that’s the best approach here then.

    Best wishes,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘JSON Import trouble’ is closed to new replies.