0

I am passing a JSON string to my Apex Method. When I try to deserialize it, I get the error: Method does not exist or incorrect signature: void deserialize(List, System.Type) from the type System.JSON

I am being prevented from saving my Apex Class. Here is my code for that piece:

public static void  createCaseImages(List<String> imgs, String caseId){
    System.debug(imgs);
    List<imageSelectionWrapper> wrpList = 
        (List<imageSelectionWrapper>) JSON.deserialize(imgs, List<imageSelectionWrapper>.class);
}

It won't let me save this piece. Any help would be appreciated.

1 Answer 1

6

You can't deploy it, because JSON.deserialize() method has different signature and takes a variable of String type as a first param, not List<String>.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .