Could not write JSON: write javaBean error, fastjson version x.x.x, class

Could not write JSON: write javaBean error, fastjson version x.x.x, class

Possible causes of error reporting (welcome to add)

1. Serialization problem. The reason is that some fields in the bean object cannot be serialized. For example, fields of multipart type cannot be serialized. You can not serialize annotations through @ jsonfailed (serialize = false)

2. When converting JSON to object, there are some syntax problems in the attribute get/set, such as null pointer, type conversion, divisor and dividend in division are 0, etc

3. Syntax problem in get/set when database query returns (as above)

Read More: