0

I newbie in JSON Programming . I have scratched to much youtube and also google about the retrieve of data into string json using C# windows form application ..

I haven't found anything till now.

Please give a example and step by step procedure of how to retrieve the data from URL into JSON string using C# windows forms application . I don't want any big application in demo.

Please its my request to give a step by step procedure of how retrieve data .

Please Please Help me .!!!!

3
Contributors
3
Replies
26
Views
2 Years
Discussion Span
Last Post by aclx
Featured Replies
  • You'll first have to download [JSON.net](http://james.newtonking.com/json) Here's a simple example.... using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using Newtonsoft.Json; class Program { static void Main(string[] args) { using (WebClient webClient = new System.Net.WebClient()) { WebClient n = new WebClient(); var json = n.DownloadString("http://data.mtgox.com/api/2/BTCUSD/money/ticker_fast"); string valueOriginal = Convert.ToString(json); … Read More

1

You'll first have to download JSON.net

Here's a simple example....

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using Newtonsoft.Json;


class Program
{
    static void Main(string[] args)
    {
        using (WebClient webClient = new System.Net.WebClient())
        {
            WebClient n = new WebClient();
            var json = n.DownloadString("http://data.mtgox.com/api/2/BTCUSD/money/ticker_fast");
            string valueOriginal = Convert.ToString(json);
                Console.WriteLine(json);
        }
    }
}
0

I tried it too but an unhandled error (An unhandled exception of type 'System.Net.WebException' occurred in System.dll) occurs. And i am not too sure why this happens. Any idea why?

Edited by aclx

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.