org.json.JSONObject报错No serializer found for class org.json.JSONObject

问题描述:

使用org.json.JSONObject作为http响应时,报错No serializer found for class org.json.JSONObject

问题原因:

该JSONObject没有实现序列化接口

解决方案:

使用实现序列化接口的JSONObject即可,如com.alibaba.fastjson.JSONObject

猜你喜欢

转载自blog.csdn.net/qq_36652619/article/details/81940029