[Postman 请求] 报错JSON parse error: Unexpected character (‘ ‘ (code 160)):
Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpected character (’ ’ (code 160)): was expecting double-quote to start field name; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character (’ ’ (code 160)): was expecting double-quote to start field name
at [Source: (PushbackInputStream); line: 2, column: 3]]
肯定的原因之一:是json格式出错 :
我没对比这个 到底哪里格式错误了,只是重新拼写的
错误格式:
{
“transType”:“01”,
“cityCode”:“6413”,
“requestTime”:“20210425160902”,
“cardNo”:“6413000173060044”,
“cardBalance”:0,
“logicType”:“04”,
“orderAmount”:0.00,
“startMonth”:“202104”,
“endMonth”:“202204”,
“payNumber”:75,
“nowMonthBalance”:0,
“verifyCardData”:{
“cardBalance”:“00000000”,
“rondam”:“429CCBD0”,
“transSeq”:“0000”,
“mac1”:“44091D09”,
“psam”:“000000000000”
},
“numberDetails”:[
{
“monthBalance”:0,
“numberMonth”:“202104”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202105”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202106”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202107”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202108”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202109”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202110”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202111”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202112”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202201”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202202”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202203”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
}]
}
正确格式:
{
“transType”: “01”,
“cityCode”: “6413”,
“requestTime”: “20210425160902”,
“cardNo”: “6413000173060044”,
“logicType”: “04”,
“orderAmount”: 0.00,
“startMonth”: “202104”,
“endMonth”: “202203”,
“payNumber”: 75,
“nowMonthBalance”: 0,
“verifyCardData”: {
“cardBalance”: “00000000”,
“rondam”: “429CCBD0”,
“transSeq”: “0000”,
“mac1”: “44091D09”,
“psam”: “000000000000”
},
“numberDetails”:[
{
“monthBalance”:0,
“numberMonth”:“202104”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202105”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202106”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202107”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202108”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202109”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202110”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202111”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202112”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202201”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202202”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
},
{
“monthBalance”:0,
“numberMonth”:“202203”,
“rechargeAmount”:0.00,
“rechargeNumber”:75
}]
}
Json 格式:
{
"cardNo": "6413000173060044",
"random": "26F804D0"
}
list 集合格式:
"numberDetails":[
{
"monthBalance":0,
"numberMonth":"202104",
"rechargeAmount":0.00,
"rechargeNumber":75
},
{
"monthBalance":0,
"numberMonth":"202105",
"rechargeAmount":0.00,
"rechargeNumber":75
},
{
"monthBalance":0,
"numberMonth":"202106",
"rechargeAmount":0.00,
"rechargeNumber":75
},
{
"monthBalance":0,
"numberMonth":"202107",
"rechargeAmount":0.00,
"rechargeNumber":75
},
{
"monthBalance":0,
"numberMonth":"202108",
"rechargeAmount":0.00,
"rechargeNumber":75
},
{
"monthBalance":0,
"numberMonth":"202109",
"rechargeAmount":0.00,
"rechargeNumber":75
},
{
"monthBalance":0,
"numberMonth":"202110",
"rechargeAmount":0.00,
"rechargeNumber":75
},
{
"monthBalance":0,
"numberMonth":"202111",
"rechargeAmount":0.00,
"rechargeNumber":75
},
{
"monthBalance":0,
"numberMonth":"202112",
"rechargeAmount":0.00,
"rechargeNumber":75
},
{
"monthBalance":0,
"numberMonth":"202201",
"rechargeAmount":0.00,
"rechargeNumber":75
},
{
"monthBalance":0,
"numberMonth":"202202",
"rechargeAmount":0.00,
"rechargeNumber":75
},
{
"monthBalance":0,
"numberMonth":"202203",
"rechargeAmount":0.00,
"rechargeNumber":75
}]
}
更多推荐
所有评论(0)