How to interpret JSON data using ASP.net?

://www.facebook.com/platform",
   "category": "Product/service",
   "likes": 1880909,
   "website": "http://developers.facebook.com",
   "username": "platform",
   "founded": "May 2007",
   "company_overview": "Facebook Platform enables anyone to build social applications on Facebook and the web.",
   "mission": "To make the web more open and social."
}

Now my question is, how to i parse and use these data to be used in my server script (i'm using VB.net)?

Any help is greatly appreciated.

Thanks.

Dim strFacebookURL As String = "https://graph.facebook.com/{0}"

        Dim strUserid As String = "19292868552"

        'Reconstruct the URL
        Dim strFormattedUri As String = String.Format(strFacebookURL, strUserid)

        Dim webRequest As HttpWebRequest = GetWebRequest(strFormattedUri)

        Dim response As HttpWebResponse = webRequest.GetResponse()

        Dim strJSONResponse As String = String.Empty

        Using sr As New StreamReader(response.GetResponseStream)
            strJSONResponse = sr.ReadToEnd
        End Using

Open in new window

tangteng78Asked:
Who is Participating?
 
CodeCruiserCommented:
Try


Dim jsonText As String = "[""Europe"", ""Asia"", ""Australia"", ""Antarctica""," & vbCr & vbLf & " ""North America"", ""South America"", ""Africa""]"

Dim continents As String() = DirectCast(JsonConvert.Import(GetType(String()), jsonText), String())
0
 
radcaesarCommented:
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
tangteng78Author Commented:
Hi MlandaT,
I'm stuck on the c sharp code here (since i'm on VB.net).

string jsonText = @"[""Europe"", ""Asia"", ""Australia"", ""Antarctica"",
 ""North America"", ""South America"", ""Africa""]";

What's the equivalent of the code above in vb.net? Any help would be greatly appreciated.

Thanks
0
 
tangteng78Author Commented:
And the equivalent of this line of code as well in Vb.net

string[] continents = (string[]) JsonConvert.Import(typeof(string[]),
 jsonText);


??

Again, any help is greatly appreciated.
0
 
MlandaTCommented:
FYI: Here is a free tool to convert between C# and VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.