Is it possible to send an array of JS strings to the server side within a JS Object field? Here is an example:
JSON:
{prodName: "abc123", prodImages: ["a1", "a2", "a3"]}
Currently, I am utilizing Jersey JAX-RS to handle the JSON input. The server-side code snippet looks like this:
Web service method signature:
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@Path("/delete")
public void deleteMethod(ProdListVO prodListDeleteVO) //...
JAX-B Object representation:
@XmlRootElement
public class ProdListVO {
private String prodName;
private String[] prodImages;
// ... getters and setters
My issue is that while prodName is correctly set, prodImages remains null. Is there a proper JSON format that Jersey recognizes as a valid Array or List of Strings?