+ Start a Discussion

Jersey lib @HttpPost trying to pass Map<String, String[]>



I am trying to make a post call to rest service in SalesFroce using jersey library.  I want to post a JSON "HashMap" to SF. I want the structure to look something like this:


    "Id1": ["email1", "email2" ... "emailX"]
    "Id2": ["email1", "email2" ... "emailX"] 




I have a custom rest service, @HttpPost method has this signiture


global static void doPost(Map<String, String[]> args)

 on the Java end I have:

MultivaluedMap<String, String> params = new MultivaluedMapImpl();


Am I taking a right aproach? What need to happen with MultivaluedMap, it only accepts <String, String> type parameters? If any knows any coding examples integrating jesey, salesforce REST API that would really help


Thank you, in advance for taking the time!