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){
    List<imageSelectionWrapper> wrpList = 
        (List<imageSelectionWrapper>) JSON.deserialize(imgs, List<imageSelectionWrapper>.class);

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


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>.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.