public static List<TestClass> getResponse() { //HttpResponse resp = 'callout'; List<TestClass> lst = (List<TestClass>) JSON.deserialize(resp.getBody(),List<TestClass>.class); return lst; } public class TestClass { public String code; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter