Error while extracting response for type [java.util.List<java.util.Map<java.lang.String,Object>>]

Some time ago, when we encountered such a problem in development, we reported the following error when a service called B service:
error while extracting response for type [Java. Util. List & lt; java.util.Map< java.lang.String, java.lang.Object>& gt;] and content type [application/json; charset=UTF-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: Invalid JSON input: Cannot deserialize instance of java.util.ArrayList< java.util.Map< java.lang.String,java.lang.Object>& gt; out of START_ OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of java.util.ArrayList< java.util.Map< java.lang.String,java.lang.Object>& gt; out of START_ OBJECT token\n at [Source: (PushbackInputStream); Line: 1, column: 1]
the red arrow is the code for service a to call service B. at that time, I searched Baidu online for a long time, and most of them said that there was a configuration problem. However, combined with the configuration posted by online friends, and then compared with the configuration of our service, we found no problem in the configuration of our service, Finally, through continuous debugging test and troubleshooting, we can eliminate all possible causes of this kind of bug. Finally, we lock the target to the response of the red arrow in the second picture. At the beginning, response = apiresult.class is a fixed return JSON lattice that we encapsulate, At that time, I didn’t doubt that this problem was caused by the annotation of swarge, which should not affect the returned result. But later, I changed the returned result to * * response = list. Class * * and the problem was solved

![]( https://img-blog.csdnimg.cn/20210627145852589.png?x-oss-process=image/watermark ,type_ ZmFuZ3poZW5naGVpdGk,shadow_ 10,text_ aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQyMzYzNTA2,size_ 16,color_ FFFFFF,t_ 70

Read More: