Jersey: Json array with 1 element is serialized as object

前端 未结 8 2172
眼角桃花
眼角桃花 2021-01-03 19:20

I\'m creating a REST server with Jersey/Java and I found a strange behavior.

I have a method on the server that returns an array of objects as Json

@         


        
8条回答
  •  自闭症患者
    2021-01-03 19:55

    Also have a look at the following answer, that solved it for me:

    How can I customize serialization of a list of JAXB objects to JSON?

提交回复
热议问题