I am using google app engine latest version 1.9.30 and I define my cloud
endpoint as follows
@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?
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/cc196565-7d86-490a-820f-842472503fba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.