net.sf.json.JSONException
来源:互联网 发布:淘宝店铺双十一宣传语 编辑:程序博客网 时间:2024/05/21 13:58
在通过json来获取String字符串时报:net.sf.json.JSONException: Unquotted string 'aae8eaa48681f2f468a3a1c1e4c95fec'
InputStreamReader isr=new InputStreamReader(request.getInputStream());
BufferedReader br=new BufferedReader(isr);
JSONObject json=JSONObject.fromObject(br.readLine());
key=json.getString("key");
原因是json获取到的数据形式是{"key":aae8eaa48681f2f468a3a1c1e4c95fec}
在传送数据的时候将值加上双引号就可以了:
{"key":"aae8eaa48681f2f468a3a1c1e4c95fec"}
阅读全文
0 0
- net.sf.json.JSONException
- net.sf.json.JSONException: java.lang.NoSuchMethodException
- net.sf.json.JSONException: Object is null
- net.sf.json.JSONException: Object is null
- net.sf.json.JSONException: Unquotted string "E44C2B0168A550F6503F59CCD56FC49B"
- net.sf.json.JSONException: java.lang.NoSuchMethodException
- net.sf.json.JSONException: Object is null
- net.sf.json.JSONException: Object is null
- JSON中 net.sf.json.JSONException: java.lang.NoSuchMethodException异常
- net.sf.json.JSONException: There is a cycle in the
- net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
- net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
- 解析net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
- net.sf.json.JSONException: va.lang.reflect.InvocationTargetException异常
- net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
- net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
- net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
- net.sf.json.JSONException: Unterminated string at character 2101
- Android中post请求AsyncTask延时
- [NLP]使用LDA模型计算文档相似度
- PHP中->和=>的意思
- C++之在资源管理类中小心copying行为(14)---《Effective C++》
- PCL1.8+vs2013环境搭建
- net.sf.json.JSONException
- D
- 数据结构(第三天)栈和队列
- AC自动机-hdu2222
- Android Studio: Theme.Sherlock.Light.DarkActionBar cannot be resolved
- 简易版的Media音乐播放器
- 代码规范
- 连续子数组的最大和
- Unity3D学习记录——GUIText2