【Angular2】Unexpected token / in JSON at position 35
来源:互联网 发布:gotomeeting软件 编辑:程序博客网 时间:2024/06/08 05:20
前言
这是一个很小的问题,但是刚遇到的时候也是各种懵
因为,逻辑挺复杂,组件传递到父组件到父组件,用到的实体是多层嵌套,测试json是500多行
所以,为了便于理解,在各个地方加了一些注释,所以报错了….因为逻辑,实体都复杂,不知道是哪错了
其实,就是因为注释
问题
1.Unexpected token / in JSON at position 35
2.Uncaught (in promise): TypeError: error.json is not a function
解决
很简单,把json数据里的注释去掉就好
Ps.当然也可能是其它问题,但最好不要是因为注释,一种自己坑自己的感觉
阅读全文
0 0
- 【Angular2】Unexpected token / in JSON at position 35
- Uncaught SyntaxError: Unexpected token < in JSON at position 0
- SyntaxError: Unexpected token s in JSON at position 111518
- SyntaxError: Unexpected token s in JSON at position 1
- 解决方法 Uncaught SyntaxError: Unexpected token < in JSON at position 0
- Uncaught SyntaxError: Unexpected token ] in JSON at position 问题
- Uncaught SyntaxError: Unexpected token o in JSON at position 1
- Uncaught SyntaxError: Unexpected token o in JSON at position 1
- Unexpected token in JSON at position 0
- Uncaught SyntaxError: Unexpected token o in JSON at position 1
- JSON.parse(str)报错Unexpected token t in JSON at position 1
- JSON.parse() Unexpected token i in JSON at position 2 报错问题
- JSON.parse()报错 Unexpected token i in JSON at position 2
- ajax post请求发送json数据报错unexpected token in json at position的问题解决
- Atitit Uncaught (in promise) SyntaxError Unexpected token < in JSON at position 0
- Uncaught (in promise) SyntaxError: Unexpected token o in JSON at position 1
- angular1.5.3.min.js:116 SyntaxError: Unexpected token g in JSON at position 63
- 【已解决】Uncaught SyntaxError: Unexpected token o in JSON at position 1
- js中with(field)和with(thisform)
- upper_bound()与lower_bound()使用方法
- mysql 备份恢复
- 计算机网络简单总结
- java用openoffice,poi+itext,jacob实现预览doc,xml的方法
- 【Angular2】Unexpected token / in JSON at position 35
- java零基础篇:(二)常见的DOS命令和java语言概述
- Retrofit源码分析 (二.基础知识反射认识)
- Eclipse / 命令行 创建多模块的Maven项目(父模块,子模块)
- 中兴新支点命令篇-环境变量命令
- 【tensorflow_error】'module' has no attribute 'select'
- react native通过react-navigation实现启动页 引导页最后跳转带抽屉的底部导航
- SQLSERVER 拆分拼接字符串,WHILE循环输出
- tn和ips的区别