Return any Json in an endpoint

0

I have an endpoint in gae, but I need to be able to return a String that contains a json, without creating a POJO, but I have not found a way to do it, this is one of my endpoinds:

    @ApiMethod(name = "get", httpMethod = "POST", path = "/get")
public String get() {

        return "{"defenseCards": "fsdfsd","friends": 5,"previousRank": 0}";

}
    
asked by gibran alexis moreno zuñiga 17.01.2018 в 22:37
source

1 answer

0

Return String or arrays is not supported. According to the documentation the endpoint should return a POJO or a CollectionResponse

    
answered by 23.07.2018 в 20:46