@Api(name="app", version="v1", transformers={EndpointDateTransformer.class})
public class MyEndpoints {
@ApiMethod(name="dummy", path="dummy", httpMethod=HttpMethod.GET)
public Map<String, Object> dummy(){
Map<String, Object> dummy = Maps.newHashMap();
dummy.put("date", DateUtil.getCurrentTimestamp());
dummy.put("number", 5L);
return dummy;
}
}here EndpointDateTransformer converts Date to Long value and the JSON response from endpoint is{ "number": "5", "date": "1452751174672" }But if I change that 5L to 5 then I see JSON response as
{ "number": 5, "date": "1452751174672" }Why cloud endpoints converting Long values as string in JSON. When I was working on old app engine versions 1.9.19 it used to work. Long rendered as long on JSON as well. Am I missing anything here?