Invalid JSON File

So I keep getting a message about Fatal error: Failed to decode Data.json from bundle because it appears to be invalid JSON.

What makes files invalid? How can i find out what is exactly invalid and how do i read any debugging. I can't seem to understand the debugging.

This is an example of what is in my JSON file. Im not sure where I'm going wrong, im also not even sure what im reading or what i should be looking for. the data in the json file i added is not what's put in i removed the information for the post.

Answered by DTS Engineer in 724793022

In situations like this, I tend to apply JSONLint.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

MessageSendFailure: Message send failure for update

==================================

|  RemoteHumanReadableError: The operation couldn’t be completed. XPC error received on message reply handler

|  

|  BSServiceConnectionErrorDomain (3):

|  ==NSLocalizedFailureReason: XPC error received on message reply handler

|  ==BSErrorCodeDescription: OperationFailed

This is what is said when i try to resume to try to preview.

Can you post the full and real JSON file ? It will be very hard to say what is invalid otherwise. May be remove the comma after the last closing curly bracket and before the ending ] ?

Accepted Answer

In situations like this, I tend to apply JSONLint.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

@KErickson Did you check for the extra comma at the end ?

Using the JSONLint that Eskimo Suggested i was able to locate the invalidation with the JSON file which was an extra comma before one of the coordinates. Now i am getting the error that follows: MessageSendFailure: Message send failure for update

==================================

|  RemoteHumanReadableError: The operation couldn’t be completed. XPC error received on message reply handler

|  BSServiceConnectionErrorDomain (3):

|  ==BSErrorCodeDescription: OperationFailed

|  ==NSLocalizedFailureReason: XPC error received on message reply handler

Invalid JSON File
 
 
Q