0

This is my JSON that is returning as "Invalid JSON":

["http://4x4forever.com", "http://www.4xfools.com", "http://www.4play-4wheelers.com/", "http://www.ci4wi.org/portal2/", "http://www.erieshoresjeeps.com/", "http://firewalker4x4.org/", "http://www.wegotmud.com/", "http://ironhorse4x4s.com/", "http://www.kifourwheelers.com/forum/"]

I imagine it has something to do with the slashes and double slashes. But even when I escape them like this, it still doesn't work:

[\"http:\/\/4x4forever.com\", \"http:\/\/www.4xfools.com\", \"http:\/\/www.4play-4wheelers.com\/\", \"http:\/\/www.ci4wi.org\/portal2\/\", \"http:\/\/www.erieshoresjeeps.com\/\", \"http:\/\/firewalker4x4.org\/\", \"http:\/\/www.wegotmud.com\/\", \"http:\/\/ironhorse4x4s.com\/\", \"http:\/\/www.kifourwheelers.com\/forum\/\"]

Do slashes and double slashes need to be escaped? I read in this answer that JSON enables you to escape forward slashes but it's not necessary.

  • Pasted your top JSON into [jsonlint.com](https://jsonlint.com/) and it spit out "Valid JSON". Where are you receiving the "Invalid JSON" error? – War10ck May 19 '20 at 18:42
  • I'm actually trying to import via XLSX into Accentuate Metafields for Shopify, and it's that bulk import that's returning the error – Larissa Huang May 19 '20 at 18:44
  • Interesting. Is the upload to _Shopify_ from JSON then or from an XLSX file? – War10ck May 19 '20 at 18:51

1 Answers1

0

The error is coming because you are escaping " Leave " as it is it will work

["http:\/\/4x4forever.com", "http:\/\/www.4xfools.com", "http:\/\/www.4play-4wheelers.com\/", "http:\/\/www.ci4wi.org\/portal2\/", "http:\/\/www.erieshoresjeeps.com\/", "http:\/\/firewalker4x4.org\/", "http:\/\/www.wegotmud.com\/", "http:\/\/ironhorse4x4s.com\/", "http:\/\/www.kifourwheelers.com\/forum\/"]
Tech-reTech
  • 89
  • 1
  • 3