Error reporting from objectmapper nested JSON to object

The error reported by objectmapper from nested JSON to object is because the entity class object does not have a parameterless constructor


1. For Java classes without constructors, the compiler will provide a default parameterless constructor; 2. If the displayed class provides a constructor, the compiler will no longer provide a default constructor; 3. When objectmapper converts a JSON string into a Java object, it needs to call the class’s parameterless constructor (assign relevant address?) 4. If a class has a parameterless constructor, it’s best to provide it with a parameterless constructor because you don’t know where it may be used

Similar Posts: