[Solved] JSON parse error: Cannot construct instance of

JSON parse error: Cannot construct instance of `com.request.ApplyRequest$Detail` (although at least one Creator exists): can only instantiate non-static inner class by using default, no-argument constructor; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.request.ApplyRequest$Detail` (although at least one Creator exists): can only instantiate non-static inner class by using default, no-argument constructor\n at [Source: (PushbackInputStream); line: 8, column: 13] (through reference chain: com.request.ApplyRequest[\"detailList\"]->java.util.ArrayList[0])

 

The problem appears: can only instantiate non-static inner class by using default
When you declare an inner class as an attribute of the current class, you need to make the inner class static, otherwise it won’t be loaded during class loading!
Solution: Declare the inner class as static directly!

Read More: