Created
April 5, 2020 08:31
-
-
Save arun12209/caf548f195866b3e27cad9f60ed531b0 to your computer and use it in GitHub Desktop.
JsonNewsWrapper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JsonNewWrapper{ | |
@AuraEnabled | |
public String status; | |
@AuraEnabled | |
public Integer totalResults; | |
@AuraEnabled | |
public List<Articles> articles; | |
public class Articles { | |
@AuraEnabled | |
public Source source; | |
@AuraEnabled | |
public String author; | |
@AuraEnabled | |
public String title; | |
@AuraEnabled | |
public String description; | |
@AuraEnabled | |
public String url; | |
@AuraEnabled | |
public String urlToImage; | |
@AuraEnabled | |
public String publishedAt; | |
@AuraEnabled | |
public String content; | |
} | |
public class Source { | |
@AuraEnabled | |
public String id; | |
@AuraEnabled | |
public String name; | |
} | |
public static JsonNewWrapper parse(String json) { | |
return (JsonNewWrapper) System.JSON.deserialize(json, JsonNewWrapper.class); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment