Issue #1302šŸ’¬ AnsweredOpened July 21, 2018by michaelreckendorfer0 reactions

Invalid JSON String - Load Data

Quick answerby artf

https://grapesjs.com/docs/modules/Storage.html#setup-the-server

Read full answer below ↓

Question

I had some problems loading templates. It did not work both the storage in a .json file and the processing in a mysql database. my loading.php is very simple for testing: <?php $ str = filegetcontents ('database.json'); echo $ str; ?> The string was split into individual characters and packaged in an array. After adjusting the following line everything worked well: grapes.js - line 42667 return this.onResponse (text, clb); to return this.onResponse (JSON.parse (text), clb); I also have the same problem when uploading assets ... here, however, I have not come up with the solution yet.

Answers (3)

suresh5• December 7, 2018

I had some problems loading templates. It did not work both the storage in a .json file and the processing in a mysql database.my loading.php is very simple for testing:The string was split into individual characters and packaged in an array.After adjusting the following line everything worked well...

suresh5• December 7, 2018

I am not able to load template reply Can you help me with json format how to send ?

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.