Tag Archives: com.alibaba.fastjson.JSONException: syntax error, expect {, actual [, pos 0

com.alibaba.fastjson.JSONException: syntax error, expect {, actual [, pos 0

  Reference website:

one   https://blog.csdn.net/z745968621/article/details/50474969

two    https://blog.csdn.net/jadyer/article/details/24395015 (reference website of the above website)


  1. Error information:

  API Documentation:

  com.alibaba.fastjson.JSONException: syntax error, expect {, actual [, pos 0

Com.alibaba.fastjson.jsonexception: syntax error, expected {, actual [, position 0

2. Error reporting reason:

This error is encountered when parsing using fastjson. There is entity B in the parsed entity A. in this JSON, there is only one entity a, but there are multiple entities B, resulting in parsing errors.

3. Error reporting solution:

When B entity is defined in a entity, it is defined as list & lt; B & gt;.

My idea is to write another method locally to read the configid from the table through areaid. Because the problem involved is the QT process, I only need to get the configid.