Created
March 27, 2012 02:29
-
-
Save superfell/2211939 to your computer and use it in GitHub Desktop.
This file contains 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
// | |
// Generated by JSON2Apex http://json2apex.herokuapp.com/ | |
// | |
public class JSON2Apex { | |
public class TagDimensions_Z { | |
public Pro Pro; | |
} | |
public class Includes { | |
} | |
public class Pro { | |
public List<String> Values; | |
public String Label; | |
public String Id; | |
} | |
public class TagDimensions { | |
public Pro Pro; | |
public Pro Con; | |
} | |
public Includes Includes; | |
public Boolean HasErrors; | |
public Integer Offset; | |
public Integer TotalResults; | |
public String Locale; | |
public List<Includes> Errors; | |
public List<Results> Results; | |
public Integer Limit; | |
public class Results { | |
public TagDimensions TagDimensions; | |
public List<String> TagDimensionsOrder; | |
public List<Includes> AdditionalFieldsOrder; | |
public Object Cons; | |
public Object IsRecommended; | |
public Boolean IsRatingsOnly; | |
public String UserNickname; | |
public Object Pros; | |
public List<Includes> Photos; | |
public Includes ContextDataValues; | |
public List<Includes> Videos; | |
public List<Includes> ContextDataValuesOrder; | |
public Object SubmissionId; | |
public String LastModificationTime; | |
public Integer TotalFeedbackCount; | |
public Integer TotalPositiveFeedbackCount; | |
public List<Includes> BadgesOrder; | |
public String UserLocation; | |
public Includes Badges; | |
public String AuthorId; | |
public List<Includes> SecondaryRatingsOrder; | |
public Boolean IsFeatured; | |
public List<Includes> ProductRecommendationIds; | |
public String Title; | |
public String ProductId; | |
public Includes AdditionalFields; | |
public Object CampaignId; | |
public Object Helpfulness; | |
public Integer TotalNegativeFeedbackCount; | |
public String SubmissionTime; | |
public Integer Rating; | |
public String ContentLocale; | |
public Integer RatingRange; | |
public Integer TotalCommentCount; | |
public String ReviewText; | |
public String ModerationStatus; | |
public List<Includes> ClientResponses; | |
public String Id; | |
public Includes SecondaryRatings; | |
public List<Includes> CommentIds; | |
public String LastModeratedTime; | |
} | |
public static JSON2Apex parse(String json) { | |
return (JSON2Apex) System.JSON.deserialize(json, JSON2Apex.class); | |
} | |
static testMethod void testParse() { | |
String json = '{\"Includes\":{},\"HasErrors\":false,\"Offset\":0,\"TotalResults\":6100,\"Locale\":\"en_US\",\"Errors\":[],\"Results\":[{\"TagDimensions\":{\"Pro\":{\"Values\":[\"Pleasing Aroma\",\"Attractive Mouthfeel/Body\"],\"Label\":\"Pros\",\"Id\":\"Pro\"},\"Con\":{\"Values\":[\"No cons at all\"],\"Label\":\"Cons\",\"Id\":\"Con\"}},\"TagDimensionsOrder\":[\"Pro\",\"Con\"],\"AdditionalFieldsOrder\":[],\"Cons\":null,\"IsRecommended\":null,\"IsRatingsOnly\":false,\"UserNickname\":\"RCSholar\",\"Pros\":null,\"Photos\":[],\"ContextDataValues\":{},\"Videos\":[],\"ContextDataValuesOrder\":[],\"SubmissionId\":null,\"LastModificationTime\":\"2009-07-21T11:58:29.000-05:00\",\"TotalFeedbackCount\":0,\"TotalPositiveFeedbackCount\":0,\"BadgesOrder\":[],\"UserLocation\":\"McGraw, NY\",\"Badges\":{},\"AuthorId\":\"b71426ca-7617-11de-b000-81c9f2d01e5a\",\"SecondaryRatingsOrder\":[],\"IsFeatured\":false,\"ProductRecommendationIds\":[],\"Title\":\"Love the singles for use in our camper\",\"ProductId\":\"2051\",\"AdditionalFields\":{},\"CampaignId\":null,\"Helpfulness\":null,\"TotalNegativeFeedbackCount\":0,\"SubmissionTime\":\"2008-07-30T19:00:00.000-05:00\",\"Rating\":5,\"ContentLocale\":\"en_US\",\"RatingRange\":5,\"TotalCommentCount\":0,\"ReviewText\":\"Just love Folger\'s tea like coffee bags...They are so good when we are camping. Now we do not have to bring a coffee pot...just for coffee...\",\"ModerationStatus\":\"APPROVED\",\"ClientResponses\":[],\"Id\":\"11908624\",\"SecondaryRatings\":{},\"CommentIds\":[],\"LastModeratedTime\":\"2009-07-21T11:58:29.000-05:00\"},{\"TagDimensions\":{\"Pro\":{\"Values\":[\"High Quality\",\"Good Value\",\"Durable\"],\"Label\":\"Pros\",\"Id\":\"Pro\"}},\"TagDimensionsOrder\":[\"Pro\"],\"AdditionalFieldsOrder\":[],\"Cons\":null,\"IsRecommended\":null,\"IsRatingsOnly\":false,\"UserNickname\":\"Zigg\",\"Pros\":null,\"Photos\":[],\"ContextDataValues\":{},\"Videos\":[],\"ContextDataValuesOrder\":[],\"SubmissionId\":null,\"LastModificationTime\":\"2009-07-21T11:58:30.000-05:00\",\"TotalFeedbackCount\":0,\"TotalPositiveFeedbackCount\":0,\"BadgesOrder\":[],\"UserLocation\":\"ER, NY\",\"Badges\":{},\"AuthorId\":\"b72f01cb-7617-11de-b000-81c9f2d01e5a\",\"SecondaryRatingsOrder\":[],\"IsFeatured\":false,\"ProductRecommendationIds\":[],\"Title\":\"Excellent Coffee\",\"ProductId\":\"2051\",\"AdditionalFields\":{},\"CampaignId\":null,\"Helpfulness\":null,\"TotalNegativeFeedbackCount\":0,\"SubmissionTime\":\"2008-10-05T19:00:00.000-05:00\",\"Rating\":5,\"ContentLocale\":\"en_US\",\"RatingRange\":5,\"TotalCommentCount\":0,\"ReviewText\":\"I love the coffee singles. I wont go back to reg. coffee. Thankyou Folgers\",\"ModerationStatus\":\"APPROVED\",\"ClientResponses\":[],\"Id\":\"11908625\",\"SecondaryRatings\":{},\"CommentIds\":[],\"LastModeratedTime\":\"2009-07-21T11:58:29.000-05:00\"},{\"TagDimensions\":{\"Pro\":{\"Values\":[\"Aroma\",\"Full Body\",\"Finish\",\"Smooth Taste\"],\"Label\":\"Pros\",\"Id\":\"Pro\"}},\"TagDimensionsOrder\":[\"Pro\"],\"AdditionalFieldsOrder\":[],\"Cons\":null,\"IsRecommended\":null,\"IsRatingsOnly\":false,\"UserNickname\":\"dane\",\"Pros\":null,\"Photos\":[],\"ContextDataValues\":{},\"Videos\":[],\"ContextDataValuesOrder\":[],\"SubmissionId\":null,\"LastModificationTime\":\"2009-07-21T11:58:30.000-05:00\",\"TotalFeedbackCount\":0,\"TotalPositiveFeedbackCount\":0,\"BadgesOrder\":[],\"UserLocation\":\"hope, tx\",\"Badges\":{},\"AuthorId\":\"b75ca17c-7617-11de-b000-81c9f2d01e5a\",\"SecondaryRatingsOrder\":[],\"IsFeatured\":false,\"ProductRecommendationIds\":[],\"Title\":\"comfort\",\"ProductId\":\"2150\",\"AdditionalFields\":{},\"CampaignId\":null,\"Helpfulness\":null,\"TotalNegativeFeedbackCount\":0,\"SubmissionTime\":\"2007-01-31T18:00:00.000-06:00\",\"Rating\":5,\"ContentLocale\":\"en_US\",\"RatingRange\":5,\"TotalCommentCount\":0,\"ReviewText\":\"this perfect cup of brew coming from green mountain k cups. add to the fact the awesome k cup discount [...]. it was a choice selection.\",\"ModerationStatus\":\"APPROVED\",\"ClientResponses\":[],\"Id\":\"11908626\",\"SecondaryRatings\":{},\"CommentIds\":[],\"LastModeratedTime\":\"2009-07-21T11:58:30.000-05:00\"},{\"TagDimensions\":{\"Pro\":{\"Values\":[\"Pleasing Roast\",\"Balanced Acidity\",\"Attractive Mouthfeel/Body\",\"Long, Satisfying Aftertaste\",\"Good With Sweetener/Whitener\",\"Pleasing Aroma\"],\"Label\":\"Pros\",\"Id\":\"Pro\"}},\"TagDimensionsOrder\":[\"Pro\"],\"AdditionalFieldsOrder\":[],\"Cons\":null,\"IsRecommended\":null,\"IsRatingsOnly\":false,\"UserNickname\":\"VINNY571\",\"Pros\":null,\"Photos\":[],\"ContextDataValues\":{},\"Videos\":[],\"ContextDataValuesOrder\":[],\"SubmissionId\":null,\"LastModificationTime\":\"2009-07-21T11:58:31.000-05:00\",\"TotalFeedbackCount\":0,\"TotalPositiveFeedbackCount\":0,\"BadgesOrder\":[],\"UserLocation\":\"VALPARAISO,IND\",\"Badges\":{},\"AuthorId\":\"b7d999b1-7617-11de-b000-81c9f2d01e5a\",\"SecondaryRatingsOrder\":[],\"IsFeatured\":false,\"ProductRecommendationIds\":[],\"Title\":\"A GREAT CUP OF COFFEE\",\"ProductId\":\"2580\",\"AdditionalFields\":{},\"CampaignId\":null,\"Helpfulness\":null,\"TotalNegativeFeedbackCount\":0,\"SubmissionTime\":\"2008-06-05T19:00:00.000-05:00\",\"Rating\":5,\"ContentLocale\":\"en_US\",\"RatingRange\":5,\"TotalCommentCount\":0,\"ReviewText\":\"THIS COFFEE IS GREAT I STILL LIKE ALOT OF THE COFFEE I BUY FROM HERE BUT THIS ONE IS MY MORNING MUST HAVE\",\"ModerationStatus\":\"APPROVED\",\"ClientResponses\":[],\"Id\":\"11908631\",\"SecondaryRatings\":{},\"CommentIds\":[],\"LastModeratedTime\":\"2009-07-21T11:58:30.000-05:00\"},{\"TagDimensions\":{\"Pro\":{\"Values\":[\"Attractive Mouthfeel/Body\",\"Long, Satisfying Aftertaste\",\"Pleasing Roast\",\"Good With Sweetener/Whitener\"],\"Label\":\"Pros\",\"Id\":\"Pro\"}},\"TagDimensionsOrder\":[\"Pro\"],\"AdditionalFieldsOrder\":[],\"Cons\":null,\"IsRecommended\":null,\"IsRatingsOnly\":false,\"UserNickname\":\"Cleo\",\"Pros\":null,\"Photos\":[],\"ContextDataValues\":{},\"Videos\":[],\"ContextDataValuesOrder\":[],\"SubmissionId\":null,\"LastModificationTime\":\"2009-07-21T11:58:31.000-05:00\",\"TotalFeedbackCount\":0,\"TotalPositiveFeedbackCount\":0,\"BadgesOrder\":[],\"UserLocation\":\"Naples, FL\",\"Badges\":{},\"AuthorId\":\"b863ff66-7617-11de-b000-81c9f2d01e5a\",\"SecondaryRatingsOrder\":[],\"IsFeatured\":false,\"ProductRecommendationIds\":[],\"Title\":\"Deeeeeeeeelicious!\",\"ProductId\":\"2508\",\"AdditionalFields\":{},\"CampaignId\":null,\"Helpfulness\":null,\"TotalNegativeFeedbackCount\":0,\"SubmissionTime\":\"2008-04-05T19:00:00.000-05:00\",\"Rating\":5,\"ContentLocale\":\"en_US\",\"RatingRange\":5,\"TotalCommentCount\":0,\"ReviewText\":\"On the bolder spectrum but really a great tasting coffee....comparable to Star***s type flavored mochas\",\"ModerationStatus\":\"APPROVED\",\"ClientResponses\":[],\"Id\":\"11908636\",\"SecondaryRatings\":{},\"CommentIds\":[],\"LastModeratedTime\":\"2009-07-21T11:58:31.000-05:00\"}],\"Limit\":5}'; | |
JSON2Apex obj = parse(json); | |
System.assert(obj != null); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment