I am getting the error mentioned in title of this question when I am calling one of my class method from a test class which is there to send the email with an attachment. Inside that method which is getting called, the second line mentioned below is causing issue:
Type idArrType = Type.forName('List<string>'); List<string> wrapperList = (List<string>) JSON.deserialize(attachId, idArrType);
The attachId is getting received properly by the method as checked by using syste.debug but what is the role of this idArrType here? As this class was created by someone else, I also have no idea and specially with this JSON issue. Any guidance will be helpful.