We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

DataGrab Unable to JSON encode payload. Error code: 5

Development and Programming

User atiqfkqZ's avatar
User atiqfkqZ
8 posts
2 months ago
User atiqfkqZ's avatar User atiqfkqZ

I’ve got a really weird Datagrab issue. I’m getting the error Unable to JSON encode payload. Error code: 5 when trying to import a JSON file 〈php 8.3.8, EE 7.5.11, Datagrab 6.0.5〉. I’ve tried every trick in the book to try and ensure that the file is UTF-8 encoded, and I’ve looked and looked for weird characters (and cannot find any). The file imports fine when using my local version of the site. Does anyone else have any tricks for me to try on this one?

       
Brian Litzinger's avatar
Brian Litzinger
710 posts
2 months ago
Brian Litzinger's avatar Brian Litzinger

Upgrade to the latest version, it has some new tooling to help try to identify what the issue is.

       
Brian Litzinger's avatar
Brian Litzinger
710 posts
2 months ago
Brian Litzinger's avatar Brian Litzinger
  • Added Preflight checks to scan json, xml, and csv files for possible encoding or formatting issues that a validator might not see
       
User atiqfkqZ's avatar
User atiqfkqZ
8 posts
2 months ago
User atiqfkqZ's avatar User atiqfkqZ

Thanks @litzinger … that’s great. I’ll do an update and check. Just knowing the line number of where the issue is happening will be useful (some of these csv files can get very long!).

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.