I am getting an Error in Apex when i try to Deserialize the JSON Response. System.JSONException: No content to map to Object due to end of input
My JSON Response in debug Log is: [{"recId":"1"},{"recId":"2"}]
My Apex Class is :
public with sharing class myvalues {
@AuraEnabled(cacheable=true)
public static List<String> thisvalue(String searchKey , String selrec){
system.debug('The value is '+selrec);
If(selrec != null || selrec != ''){
List<String> f = (List<String>) JSON.deserialize(selrec,
List<String>.class);
system.debug('value of List is '+f);
}
}
}
What Am I missing Here?