+ Start a Discussion
Renan Freitas 4Renan Freitas 4 

Test class for deserialize Json


Hello everyone, I'm trying to cover this snippet of code that deserializes a json:
public ResponsavelFarmaResponseEntity parse(String json) {
            try{
                return (ResponsavelFarmaResponseEntity) System.JSON.deserialize(json, ResponsavelFarmaResponseEntity.class);
            } catch(Exception ex){
                System.debug('Falha >>> ResponsavelFarmaResponseEntity ' + ex.getMessage());
            }    
            
            return null;
        }

but without succes someone would have some idea or similar code to show
Thanks in advance