"I Am the Pit":The global profile App.json is prone to errors such as the following:
-
An error occurred in the file path.
-
The page is not configured on pages.
-
Code comments.
-
Use single quotation marks.
1. File path error
file path is incorrectly written, For example, the word is wrong or missing the directory name, this is more easily found. In addition, the filename does not need to write the file suffix, because the framework will automatically look for the path under. JSON,. js,. Wxml,. WXSS four files to consolidate.
3. Code comment
It's a good habit to write comments to code. But it's not good to write notes in the App.json file.
4. Using single quotation marks
The error is as follows:
This error, even if experienced by a veteran, may be tangled, the content configured in the App.json file is a JSON data format. In small programs, the JSON data format requirements are more stringent, you should use double quotes instead of single quotes!
"extended reading":
json syntax rules
in the JS language, everything is an object. Therefore, any supported type can be represented by JSON, such as strings, numbers, objects, arrays, and so on.
Here are some examples of how you would normally use single double quotes when defining JSON:
Finally, we recommend a JSON online parsing and formatting verification tool--json.cn.
2nd Pit: Global profile App.json Common error Rollup