XStream serialization bug?

7 views
Skip to first unread message

xybrek

unread,
Aug 30, 2018, 8:42:16 AM8/30/18
to Restlet Framework (Discuss)

I'm not sure if this is a Restlet/XStream bug but when you have a resource like this

List<User> getUsers() {}

And this resource returns a single element List then the resulting JSON string is like this

{ "users" : { "id" : 1 } } 

Instead of

{ "users" : [{ "id" : 1 }] } 

The problem here is the result was not JSON array as expected.

Is there a workaround for this bug?

Reply all
Reply to author
Forward
0 new messages