json - 如何使用 manifest / service-worker 制作 PWA?
问题描述
我的 manifest.json 中有语法错误
清单:第 7 行,第 1 列,语法错误。
我正在尝试删除文件中的所有数据,但我得到了同样的错误。
看看我的 manifest.json
{
"name" : "VIDEOFUTUR",
"short_name" : "VF",
"description" : "Télécom",
"start_url" : "index.php",
"scope" : "/",
"display" : "fullscreen",
"orientation" : "any",
"lang" : "French",
"icons" : [
{
"src": "https://lafibrevideofutur.fr/img/favicon.png",
"sizes": "256x256"
}],
}
解决方案
你有没有发现 后面那个杂乱的逗号icons
?
应该:
{
"name": "VIDEOFUTUR",
"short_name": "VF",
"description": "Télécom",
"start_url": "index.php",
"scope": "/",
"display": "fullscreen",
"orientation": "any",
"lang": "French",
"icons": [
{
"src":"https://lafibrevideofutur.fr/img/favicon.png",
"sizes":"256x256"
}
]
}
下次只需使用任何在线工具验证您的 JSON 。
推荐阅读
- php - 如何在 PHP 中使用 SQL 或 PDO 获取最后插入的 id?
- javascript - 根据新数据对对象数组进行排序
- javascript - RTCDataChannels 是否保证在 ICE 状态变为连接后打开?
- python - 如何为 pandas 数据库中的特定行和列分配值?
- python - 尝试使用 Python flask 在 HTML 网页中显示 sql 表内容时出现 404 错误
- python - 自动运行 Python/Applescript 代码来访问 Mac Outlook——cron 的替代方案?
- angular - 角度摘要和数据突变
- iis-7 - iis7 urlrewrite 以屏蔽目标 url
- pytorch - 使用 Google AI Platform 提供 PyTorch 预测的推荐方法
- python - 如何在用@classmethod 修饰的方法中访问定义在__init__() 中的属性?