试用Baidu_Voice_RestApi_SampleCode java代码 报错 啥原因
gxk448468678 发布于2016-01-29 浏览:1186 回复:2
0
收藏

{

    "scope": "public audio_voice_assistant_get audio_tts_post wise_adapt lebo_resource_base lightservice_public hetu_basic lightcms_map_poi kaidian_kaidian",

    "session_secret": "c7f6e1023dcb8cd622939f4be594e81d",

    "expires_in": 2592000,

    "refresh_token": "25.1390a25562d5877df15975cb81dcb590.315360000.1769440000.282335-7726618",

    "session_key": "9mzdWu+7A7kuEah06GJg4sLdE8BZ7nUW+7NfPLMDijuCnydNWEB2Sml8cUHWiR3rRDjpjG3CadwhDgOQGIxtKnL9oR5G",

    "access_token": "24.a36c11e833ba94991c30e5b1e70627e6.2592000.1456672000.282335-7726618"

}

Exception in thread "main" org.json.JSONException: Expected a ',' or ']' at 99 [character 100 line 1]

at org.json.JSONTokener.syntaxError(JSONTokener.java:433)

at org.json.JSONArray.(JSONArray.java:127)

at org.json.JSONTokener.nextValue(JSONTokener.java:367)

at org.json.JSONObject.(JSONObject.java:217)

at org.json.JSONObject.(JSONObject.java:324)

at com.baidu.speech.serviceapi.Sample.printResponse(Sample.java:105)

at com.baidu.speech.serviceapi.Sample.method1(Sample.java:67)

at com.baidu.speech.serviceapi.Sample.main(Sample.java:29)


收藏
点赞
0
个赞
共2条回复 最后由smiledemo21回复于2018-03-08
#3smiledemo21回复于2018-03-08

项目编码格式改成  utf-8

0
#2mosal4hi回复于2016-03-14

json格式解析错误,看了下贴的json格式有问题,sessionkey缺少,"

0
TOP
切换版块