J'ai besoin d'aide pour la signature de la méthode sur la méthode updateGroup
. Voici le json im passing - c'est un tableau d'actions.comment passer l'objet json à un service web de repos java en utilisant jax rs
[{"action":"add","key":"104"}]
c'est la méthode qu'elle soit passé à
@PUT
@Path("/group/{id}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public IRestResponse updateGroup(@PathParam("id") String GroupName,
Object GroupActions){
//Do Something...
}
Quel type devrait être GroupActions
ci-dessus pour recevoir la JSON. ? HashMap
, ArrayList
, une combinaison?