fastjson bug

public static void main(String args[]) {
    Student s1 = new Student();
    s1.setName("[{\"category\":1,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102938_65871f57-8be3-4197-a897-68ef3d84f687.jpg\"},{\"category\":1,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102948_24d9b7c2-6f66-4d07-bf6e-f2bfc48093a1.jpg\"},{\"category\":1,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102942_9400cb56-5d2f-46ed-9158-2a2024868cc2.jpg\"},{\"category\":1,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102939_6582e734-a64b-4707-9d46-0922dab74494.jpg\"},{\"category\":1,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102950_8cd31c29-1b6a-4774-97ea-d8b6dc3906e4.jpg\"},{\"category\":1,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102938_3de27039-5f42-464f-a49c-275693e1273e.jpg\"},{\"category\":1,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102952_fa7703ab-afa1-4b89-b3e1-140b97e8c877.jpg\"},{\"category\":1,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102939_8cc36020-9b75-48e5-a53f-1433fa96ee5b.jpg\"},{\"category\":1,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102944_77e3b8f1-b89e-4e35-b823-14e60e3804ae.jpg\"},{\"category\":1,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102938_42287e98-24b8-425b-ac92-be2d0c37b643.jpg\"},{\"category\":2,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102944_30c2aa45-dd8b-4817-b59c-d49e6cafdd15.jpg\"},{\"category\":1,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102946_2aee57f7-7a9b-4dc0-951f-b2ae7fd1c6d0.jpg\"},{\"category\":1,\"iscover\":0,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102940_41299f67-e16f-4ba4-bf7f-762afe64b423.jpg\"},{\"category\":1,\"iscover\":1,\"url\":\"http://cdzystatic.centalinely.com.cn//Images/20171128/102939_1cd28645-3273-4486-96ec-b5b821a2d1e0.jpg\"}]");
    Object obje2 = JSON.toJSON(s1);
}

这里序列化后出现了字符串被吞掉一半的情况,记录一下,有时间了提交

上一篇:读取JSON配置文件的值


下一篇:利用alibaba的fastjson实现,json<==>string<==>对象之间的转换