Я работаю над проектом, и у меня есть следующий вызов
try {this.set("config", JSON.parse(dijitConfig));}
с dijitConfig =
"\r\n{\r\n \"getStationUrl\" : \"http://localhost:6080/arcgis/rest/services/testcenterline/MapServer/exts/StationLocator/GetStation\",\t\r\n\t\"tolerance\" : 5,\r\n\t\"getStationInterval\" : 1\r\n}\n//# sourceURL=http://localhost:63342/StationLocator/Main/StationLocator%20JSAPI/Source/StationLocator%20JSAPI/js/StationLocatorConfig.js"
По какой-то причине, когда я запускаю это через Chrome, приложение запускается без ошибок, внутри Webstorm я получаю следующее исключение:
SyntaxError: Unexpected token / in JSON at position 180
Почему этот JSON действителен в Chrome, но не в Webstorm?
Обратите внимание, что в Webstorm у меня включен HTML5/ECMAScript 5 в Settings->Languages & Frameworks->JavaScript->Libraries
.