function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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