keep getting this error: \"Manifest is not valid JSON. Line: 1, column: 1, Unexpected token.\" i don\'t understand what the issue is with my code? here is what i have so f
In my particular case, I had this added in my manifest.json:
"storage": {
"managed_schema": "storage.json"
}
But my storage.json was empty. I had to edit my storage.json file with this content:
{
"$schema": "http://json-schema.org/draft-03/schema#",
"type": "object",
"properties": {
"adminSettings": {
"title": "A valid JSON string compliant with backup format.",
"description": "All entries present will overwrite local settings.",
"type": "string"
}
}
}
But in general, here's my advice when you get this Line 1 Col 1 Unexpected Token misleading error that basically translates to: Something is wrong in one or more sections of your JSON and may or may not have anything to do with syntax in this file.
manifest.json file such as manifest_version, name, description, etc. manifest.json. This is how I found out that my storage block was the problem. I looked at another Chrome Extension to see how they did things and realized my error.