fastjson2 icon indicating copy to clipboard operation
fastjson2 copied to clipboard

com.alibaba.fastjson2.JSONException: offset 60, character , line 1, column 61, fastjson-version 2.0.43 "{\"patientName\":\"aasf\",\"callNumber\":51,\"queueId\":1}"

Open mxj009 opened this issue 2 years ago • 3 comments

问题描述

简要描述您碰到的问题。 很简单的字符转化:"{"patientName":"aasf","callNumber":51,"queueId":1}" JSONObject json = JSON.parseObject(message);

报错信息如下: com.alibaba.fastjson2.JSONException: illegal input, offset 60, char 

环境信息

请填写以下信息:

  • OS信息: [e.g.:window11]
  • JDK信息: [e.g.:jdk21]
  • 版本信息:[e.g.:Fastjson2 2.0.39]

mxj009 avatar Dec 19 '23 07:12 mxj009

1 https://github.com/alibaba/fastjson2/assets/25301802/e7fa7d41-4815-45c4-812e-8bb9452f1045

mxj009 avatar Dec 19 '23 07:12 mxj009

2.0.43未复现 image

oooopl avatar Dec 20 '23 02:12 oooopl

奇怪了,你看我那个已经走到2039行了,这里判断如果是空,则return,因为不为空,所以走到异常了

mxj009 avatar Dec 20 '23 03:12 mxj009