You need to sign in to do that
Don't have an account?
Tanner Russell
Issue trying to Deserialize json
I am deserializing json using List<Object> eqt = (List<Object>) JSON.deserializeUntyped(response.getBody()); the issue is that this will work and run if I run it anomonously but if I run it in a test I get System.TypeException: Invalid conversion from runtime type Map<String,ANY> to List<ANY>.
But If I switch it to the map the test code will say there are no exception but the code does not run giving me the opposite exception cannot convert list to map ...
But If I switch it to the map the test code will say there are no exception but the code does not run giving me the opposite exception cannot convert list to map ...
I guess you are aware that in Test Classes the actual Apex Callouts does not work and hence you have to create mock classes which will contain mocked version of responses you want. Please confirm so that I can help you further. thanks.