How to interpret JSON data using

Posted on 2011-05-05
Last Modified: 2012-05-11
   "category": "Product/service",
   "likes": 1880909,
   "website": "",
   "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

Any help is greatly appreciated.


Dim strFacebookURL As String = "{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

Question by:tangteng78
    LVL 9

    Expert Comment

    LVL 30

    Expert Comment


    Author Comment

    Hi MlandaT,
    I'm stuck on the c sharp code here (since i'm on

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

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


    Author Comment

    And the equivalent of this line of code as well in

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


    Again, any help is greatly appreciated.
    LVL 83

    Accepted Solution


    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())
    LVL 30

    Assisted Solution

    FYI: Here is a free tool to convert between C# and VB.NET:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now