Issue #1442Opened September 19, 2018by comedydriving1 reactions

can't get json data to load.

Question

I'm able to save my json data to the database, but I cannot get the template to load it properly.

My json data can be seen here:

json_data

when I load the page it shows like this in the console, which leads me to believe the json isn't loading properly:

json_load

Is something not formatted in my json correctly?

Answers (2)

comedydrivingSeptember 20, 20181 reactions

Solved. So the first issue is the content type needed to be json. Then I had to update my store php script to accept the json data:

$_POST = json_decode(file_get_contents('php://input'), true);

Lastly, my field in the database was set to "text" instead of "long text" so the json components were getting cut off.

lock[bot]September 20, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.