Created
September 16, 2015 20:19
-
-
Save vkbandi/1f4fd41825efacbeeded to your computer and use it in GitHub Desktop.
A simple C# script for showing how to analyze the results from twitter json - code snippet for coderbuddy.wordpress.com
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
//The following code is a straight copy from jamiedigi.com | |
HashTable jsonHash = (Hashtable)JSON.JsonDecode(jsonCode); | |
ArrayList jsonResults = (ArrayList)jsonHash["results"]; | |
foreach (object objResult in jsonResults) | |
{ | |
Hashtable jsonResult = (Hashtable)objResult; | |
System.Diagnostics.Debug.WriteLine("User ID: " | |
+ jsonResult["from_user_id"].ToString()); | |
System.Diagnostics.Debug.WriteLine("Tweet text: " | |
+ jsonResult["text"].ToString()); | |
System.Diagnostics.Debug.WriteLine("Tweet date: " | |
+ jsonResult["created_at"].ToString()); | |
System.Diagnostics.Debug.WriteLine("User name: " | |
+ jsonResult["from_user"].ToString()); | |
System.Diagnostics.Debug.WriteLine("Language: " | |
+ jsonResult["iso_language_code"].ToString()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment