Can not deserialize instance of java.util.ArrayList out of VALUE_STRING

前端 未结 5 1668
谎友^
谎友^ 2020-11-30 04:41

I have a REST service built with Jersey and deployed in the AppEngine. The REST service implements the verb PUT that consumes an application/json media type. Th

5条回答
  •  死守一世寂寞
    2020-11-30 05:08

    For people that find this question by searching for the error message, you can also see this error if you make a mistake in your @JsonProperty annotations such that you annotate a List-typed property with the name of a single-valued field:

    @JsonProperty("someSingleValuedField") // Oops, should have been "someMultiValuedField"
    public List getMyField() { // deserialization fails - single value into List
      return myField;
    }
    

提交回复
热议问题