I'm trying to import my JSON file into my Firebase but it keeps giving me this error. I don't know why this JSON file isn't allowed to be imported into since JSONLint says it's a valid JSON file.
Here's the file:
{
"Featured" : {
"artist" : "james turell",
"artistEPK" : "artistsownepk.pdf",
"author" : "john queue author",
"date" : "7/28/2016",
"fullScreenImg" : "https://firebasestorage.googleapis.com/v0/b/wallplay-a8440.appspot.com/o/Screen%20Shot%202016-06-08%20at%2012.00.06%20PM.png?alt=media&token=1df5d60d-808c-48bb-a591-e005f82e4687",
"linksToMedia" : [ "www.wallplay.com/project-name/james-t/press.html" ],
"linksToPress" : [ "" ],
"location" : "10 Main Street",
"mainImg" : "https://firebasestorage.googleapis.com/v0/b/wallplay-a8440.appspot.com/o/Screen%20Shot%202016-06-08%20at%2012.00.06%20PM.png?alt=media&token=1df5d60d-808c-48bb-a591-e005f82e4687",
"pressImgs" : [ "https://firebasestorage.googleapis.com/v0/b/wallplay-a8440.appspot.com/o/Screen%20Shot%202016-06-08%20at%2012.00.06%20PM.png?alt=media&token=1df5d60d-808c-48bb-a591-e005f82e4687", "https://firebasestorage.googleapis.com/v0/b/wallplay-a8440.appspot.com/o/Screen%20Shot%202016-06-08%20at%2012.00.06%20PM.png?alt=media&token=1df5d60d-808c-48bb-a591-e005f82e4687", "https://firebasestorage.googleapis.com/v0/b/wallplay-a8440.appspot.com/o/Screen%20Shot%202016-06-08%20at%2012.00.06%20PM.png?alt=media&token=1df5d60d-808c-48bb-a591-e005f82e4687" ],
"pressRelease" : "projectpressrelease.pdf",
"projectImgs" : [ "https://firebasestorage.googleapis.com/v0/b/wallplay-a8440.appspot.com/o/Screen%20Shot%202016-06-08%20at%2012.00.06%20PM.png?alt=media&token=1df5d60d-808c-48bb-a591-e005f82e4687", "https://firebasestorage.googleapis.com/v0/b/wallplay-a8440.appspot.com/o/Screen%20Shot%202016-06-08%20at%2012.00.06%20PM.png?alt=media&token=1df5d60d-808c-48bb-a591-e005f82e4687", "https://firebasestorage.googleapis.com/v0/b/wallplay-a8440.appspot.com/o/Screen%20Shot%202016-06-08%20at%2012.00.06%20PM.png?alt=media&token=1df5d60d-808c-48bb-a591-e005f82e4687" ],
"projectSubheader" : "subheader of project",
"projectTitle" : "title of project",
"projectURL" : "",
"soundFile" : [ ],
"text" : "here there would be a text for james turell",
"videoURL" : ""
},
"Future" : {
},
"Past" : {
},
"Present" : {
}
}
the issue happens when importing json using the web interface
Usually used when non-well-formed content (content that does not conform to JSON syntax as per specification) is encountered. For further details see the "Raw Error Message" and the additional messages” Error: “Invalid UTF-8 start byte” Error: “An error occurred indicating a json parsing problem.
Any valid string can be used as a JSON key. The following characters are invalid when used in a JSON key: " (double quote) – It must be escaped. \ (backslash) – It must be used to escape certain characters. all control characters like \n , \t.
I just spent some time on this and found the issue for me (and likely for many others) when getting this error message. It looks like firebase can only import files with UTF-8 encoding (no BOM)
I found it strange, as I couldn't re-import the content I had just exported.
I tried all UTF versions 8, 16 with LE and BE with and without BOM, only UTF-8
works
I wish firebase did not have this utterly misleading error message
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With