I am using IntelliJ IDEA 14 for a web project, where I want to keep a file a.js
containing a JSON object. The content of the a.js
is
{
"ac" : "abc",
"d" : 4,
"_constants": {}
}
While editing this file, IntelliJ keeps reminding me that this file has syntactic errors. It makes a hints after "ac", "d" and "_constants", before the semicolon, saying "Expecting newline or semicolon".
Does not IntelliJ IDEA accept a file containing a JSON object as a legitimate javascript file?
IntelliJ has a separate file type for JSON files. It will be applied if you rename your file from a.js to a.json.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments