chirino/resty-gwt — Issue #84: JSON list with "null" decoding
Author: tmp120210
Created: 2012-02-10 09:27:58+00:00
State: open

RestyGWT fails to decode this JSON string "{"somelist":[null]}", but this is a valid JSON string.
To reproduce this, create a class

public class Foo{
public List bars = new ArrayList();
}

Then, on server-side generate an object:

Foo f = new Foo();
f.bars.add(null);

Then generate a JSON string and push it to the client:
new ObjectMapper().writeValueAsString(f); //I'm using Jackson

"Invalid JSON document" exception will occur on the client side.