public string ConvertUri(string uri, string rootName, out string json) { using(var client = new WebClient()) { json = client.DownloadString(uri); } _crawler = new JsonDataCrawler(JsonMapper.ToObject(json), rootName); return HttpUtility.HtmlEncode(_crawler.Crawl().ToString()); }
public void Match_Similar_Class_Signatures() { var user = SetupData(); var json = JsonConvert.SerializeObject(user); var deserializedData = JsonMapper.ToObject(json); var crawler = new JsonDataCrawler(deserializedData, "User"); var signatures = crawler.Crawl(); Assert.AreEqual(signatures.Count, 3); Debug.Write(signatures.ToString()); }
public void Can_Convert_Youtube_JSON_To_POCOs() { var crawler = new JsonDataCrawler(JsonMapper.ToObject(YoutubeJSON), "YoutubeApi"); var code = crawler.Crawl(); Debug.Write(code); }
public void Can_Convert_Twitter_JSON_To_POCOs() { var crawler = new JsonDataCrawler(JsonMapper.ToObject(TwitterSearchJSON), "Search"); var code = crawler.Crawl(); Debug.Write(code); }
public void Can_Convert_Facebook_Wall_JSON_To_POCOs() { var crawler = new JsonDataCrawler(JsonMapper.ToObject(FacebookWallJSON), "Wall"); var code = crawler.Crawl(); Debug.Write(code); }
public string Convert(string json, string rootName) { _crawler = new JsonDataCrawler(JsonMapper.ToObject(json), rootName); return HttpUtility.HtmlEncode(_crawler.Crawl().ToString()); }