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

[QUESTION] JSON.parse后,1.2.83版本没问题,2.0.47报错 #2334

Closed
1029219814 opened this issue Mar 18, 2024 · 2 comments
Closed

[QUESTION] JSON.parse后,1.2.83版本没问题,2.0.47报错 #2334

1029219814 opened this issue Mar 18, 2024 · 2 comments
Labels
bug Something isn't working fixed question Further information is requested
Milestone

Comments

@1029219814
Copy link

对于字符串。""{\"data\":{\"signature\":\"xxx\",\"payment\":{\"to\":\"xxx\",\"from\":\"xxx\",\"fee\":\"200000000\",\"token\":\"1\",\"nonce\":\"0\",\"memo\":\"\",\"amount\":\"0\",\"valid_until\":\"0\"},\"stake_delegation\":null,\"create_token\":null,\"create_token_account\":null,\"mint_tokens\":null}}""

public static void main(String[] args) {
      String rawTx = "\"{\\\"data\\\":{\\\"signature\\\":\\\"xxx\\\",\\\"payment\\\":{\\\"to\\\":\\\"xxx\\\",\\\"from\\\":\\\"xxx\\\",\\\"fee\\\":\\\"200000000\\\",\\\"token\\\":\\\"1\\\",\\\"nonce\\\":\\\"0\\\",\\\"memo\\\":\\\"\\\",\\\"amount\\\":\\\"0\\\",\\\"valid_until\\\":\\\"0\\\"},\\\"stake_delegation\\\":null,\\\"create_token\\\":null,\\\"create_token_account\\\":null,\\\"mint_tokens\\\":null}}\"";
      JSONObject signedTx = JSONObject.parseObject(JSONObject.parse(rawTx).toString());
      System.err.println(signedTx);
  }

1.2.83可以正常解析,但是2.0.47报Exception in thread "main" com.alibaba.fastjson2.JSONException: offset 541, character �, line 1, column 541, fastjson-version 2.0.47 错误。这是预期的错误吗?

@1029219814 1029219814 added the question Further information is requested label Mar 18, 2024
@wenshao
Copy link
Member

wenshao commented Mar 20, 2024

https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.48-SNAPSHOT/ 问题已修复,请帮忙用2.0.48-SNAPSHOT验证,2.0.48正式版本预计在月末发布

@wenshao wenshao added bug Something isn't working fixed labels Mar 20, 2024
@wenshao wenshao added this to the 2.0.48 milestone Mar 20, 2024
@wenshao
Copy link
Member

wenshao commented Mar 25, 2024

@wenshao wenshao closed this as completed Mar 25, 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 fixed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants