gogoWebsite

Appears in fastjson:(syntax error, expect {, actual string, pos 0)

Updated to 1 hour ago
1: Cause analysis

Original data format problem:There is one more "\"

"{\"obj_id\": \"shzc_test_01\", \"img_url\": \"/businessImages/imageFile/a7rMTLYrqIg/shzc_test_01/2020-05-11/shzc_test_01_1589190347333.jpg\"}"
Two: Problem solving

1. First use alibaba's fastjson(msg)Format
Format will automatically remove "\"

{"img_url": "/businessImages/imageFile/a7rMTLYrqIg/shzc_test_01/2020-05-11/shzc_test_01_1589195337809.jpg", "obj_id": "shzc_test_01", "upload_time": "2020-05-11 19:00:01"}

2. Reuse(msg,)Convert string to bean object