Cloud Endpoint parameter should not be named

后端 未结 4 1081
野的像风
野的像风 2021-01-13 11:29

I want send a HashMap from JS application to my Google App. I created a HashMapContainer class such as in : Cloud Endpoints C

4条回答
  •  借酒劲吻你
    2021-01-13 12:21

    Using HashMap would get all the parameters passed to the Api Method, what i will advise is you use HaspMap as param2 map type, then this notifies us that inside this hashmap we can have our param2 as key of the hashmap. Then we can type cast the value of the param key to HashMap then we can loop through it like as if is the normal initial hashMap passed initially.

    HashMap  mapR = (HashMap ) param2.get("param2");
    
            for(Map.Entry x:mapR.entrySet()){
                log.log(Level.INFO,x.getKey()+","+x.getVaue());
    
            }
    

提交回复
热议问题