Skip to main content
added 62 characters in body
Source Link
Donal Fellows
  • 138.8k
  • 19
  • 161
  • 222

I need help with the method signature on the updateGroupupdateGroup method. Here is the json im passing - its an array of actions.

    [{"action":"add","key":"104"}]

this is the method its being passed to

@PUT
@Path("/group/{id}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public IRestResponse updateGroup(@PathParam("id") String GroupName, 
 **Object GroupActions**                               Object GroupActions){
    //Do Something...
    }

What type should GroupActionsGroupActions be above to recieve the json. ? HashMapHashMap, ArrayListArrayList, some combination?

I need help with the method signature on the updateGroup method. Here is the json im passing - its an array of actions.

    [{"action":"add","key":"104"}]

this is the method its being passed to

@PUT
@Path("/group/{id}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public IRestResponse updateGroup(@PathParam("id") String GroupName, **Object GroupActions**  ){
    //Do Something...
    }

What should GroupActions be above to recieve the json. ? HashMap, ArrayList, some combination?

I need help with the method signature on the updateGroup method. Here is the json im passing - its an array of actions.

    [{"action":"add","key":"104"}]

this is the method its being passed to

@PUT
@Path("/group/{id}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public IRestResponse updateGroup(@PathParam("id") String GroupName, 
                                 Object GroupActions){
    //Do Something...
}

What type should GroupActions be above to recieve the json. ? HashMap, ArrayList, some combination?

Source Link
ender
  • 121
  • 2
  • 3
  • 9

how to pass json object to a java rest webservice using jax rs

I need help with the method signature on the updateGroup method. Here is the json im passing - its an array of actions.

    [{"action":"add","key":"104"}]

this is the method its being passed to

@PUT
@Path("/group/{id}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public IRestResponse updateGroup(@PathParam("id") String GroupName, **Object GroupActions**  ){
    //Do Something...
    }

What should GroupActions be above to recieve the json. ? HashMap, ArrayList, some combination?