Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] fieldName not support input type STR_UTF16 123, offset 1 #2993

Open
cutv opened this issue Sep 28, 2024 · 0 comments
Open

[BUG] fieldName not support input type STR_UTF16 123, offset 1 #2993

cutv opened this issue Sep 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cutv
Copy link

cutv commented Sep 28, 2024

问题描述

简要描述您碰到的问题。

JSONString: {"terminal_version":"MT5","server":"Exness-MT5Trial14","login":189193036,"client_id":"$1$E6e.eu23$ZKPS96lkiCcfSo5iILvgl.","type":"initialize","data":"{"server":"Exness-MT5Trial14","login":189193036}"}

CODE: JSON.parseObject(raw, DtbMessage.class);
EXCEPTION:
com.alibaba.fastjson2.JSONException: not support input {"server":"Exness-MT5Trial14","login":189193036}, offset 206, character }, line 1, column 206, fastjson-version 2.0.53 {"terminal_version":"MT5","server":"Exness-MT5Trial14","login":189193036,"client_id":"$1$E6e.eu23$ZKPS96lkiCcfSo5iILvgl.","type":"initialize","data":"{"server":"Exness-MT5Trial14","login":189193036}"}
at com.alibaba.fastjson2.JSONReader.readBinary(JSONReader.java:690)
at com.alibaba.fastjson2.reader.ObjectReaderImplInt8ValueArray.readObject(ObjectReaderImplInt8ValueArray.java:82)
at com.alibaba.fastjson2.reader.ORG_2_6_DtbMessage.readObject(Unknown Source)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:1534)

JSONString: {"terminal_version":"MT5","server":"Exness-MT5Trial14","login":189193036,"client_id":"$1$E6e.eu23$ZKPS96lkiCcfSo5iILvgl.","type":"initialize","data":"{"server":"Exness-MT5Trial14","login":189193036}"}
CODE: JSONB.parseObject(raw, DtbMessage.class); raw is byte[]
EXCEPTION:
com.alibaba.fastjson2.JSONException: fieldName not support input type STR_UTF16 123, offset 1
at com.alibaba.fastjson2.JSONReaderJSONB.readFieldNameHashCodeError(JSONReaderJSONB.java:1635)
at com.alibaba.fastjson2.JSONReaderJSONB.readFieldNameHashCode(JSONReaderJSONB.java:1537)
at com.alibaba.fastjson2.reader.ORG_1_6_DtbMessage.readJSONBObject(Unknown Source)
at com.alibaba.fastjson2.JSONB.parseObject(JSONB.java:491)

image

Fastjson2 2.0.53

@cutv cutv added the bug Something isn't working label Sep 28, 2024
@cutv cutv closed this as completed Sep 28, 2024
@cutv cutv reopened this Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant