문제

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);
도움이 되었습니까?

해결책

This behaviour was a bug. It has been fixed in the latest source version, so v1.4 onwards should not see this issue.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top