我正在使用vue JavaScript 2.5,有一种语法不要使用分号,多余的空格等,当我尝试导入“常规” JavaScript库时,出现类似以下错误:
{"sortable": [
{
"id": 5673,
"trip_count": 66,
"origin": {
"id": 806,
"name": "Name1",
"lat": "40.70823502",
"lng": "-74.00530063"
},
"destination": {
"id": 812,
"name": "Name2",
"lat": "40.722055",
"lng": "-73.989111"
},
"maps": {
"thumb": "paththumb.png",
"small": "pathsmall.png",
"large": "pathlarge.png"
}
},
{
"id": 5035,
"trip_count": 64,
"origin": {
"id": 1545,
"name": "Name3",
"lat": null,
"lng": null
},
"destination": {
"id": 865,
"name": "Name4",
"lat": "40.72243797",
"lng": "-74.00566443"
},
"maps": {
"thumb": null,
"small": null,
"large": null
}
}]
}
有什么办法可以避免吗?
我要导入为:
Extra semicolon
Missing space before function parentheses
A constructor name should not start with a lowercase letter