This behaviour was a bug. It has been fixed in the latest source version, so v1.4 onwards should not see this issue.
How to serialze a map in RestyGWT
Domanda
I want to send a Map<String,Object>
to a server using RestyGWT. However, when I serialize a map in the request it adds extra quote escapes around the string keys.
So,
map.put("hello",123);
service.sendRequest(map,callback);
results in JSON being sent of
{"\"hello\"":123}
instead of the desired result
{"hello":123}
Here is the RestyGWT interface:
@POST
@Path("/data")
public void setRequest(Map<String, Object> map, JsonCallback callback);
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow