728x90
๋ฐ์ํ
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;
using Newtonsoft.Json.Linq;
namespace covidView
{
public partial class Form1 : Form
{
private const string URL = "https://api.corona-19.kr/korea/beta/";
private string api = "?serviceKey={Your_APIKEY}";
public Form1()
{
InitializeComponent();
Console.WriteLine("Hello world!");
using (WebClient wc = new WebClient())
{
string res = new WebClient().DownloadString(URL + api);
JObject json = JObject.Parse(res);
Console.WriteLine(json["API"]);
}
}
}
}
์ฐธ๊ณ :
C# ์ฃผ์์ ์์ฒญ ๋ณด๋ด๊ณ json ๊ฐ ๋ฐ๊ธฐ
using System.Net; namespace WindowsFormsApp1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); button1.Click += request; } private void request(object sender, EventArgs e..
fors.tistory.com
https://stackoverflow.com/questions/22870624/convert-json-string-to-json-object-c-sharp
Convert JSON String to JSON Object c#
I have this String stored in my database: str = "{ "context_name": { "lower_bound": "value", "upper_bound": "value", "values": [ "value1", "valueN" ] } }" This string is already in the JSON forma...
stackoverflow.com
728x90
๋ฐ์ํ
'๐จ๐ผโ๐ป๊ฐ๋ฐ > C#' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
C# - ํ๋ก๊ทธ๋จ ์ค๋ณต ์คํ ๋ฐฉ์งํ๊ธฐ (0) | 2022.08.26 |
---|---|
C# - ๋ค๋ฅธ ํ๋ก์ธ์ค๋ผ๋ฆฌ ๋ฉ์์ง(string) ์ ๋ฌํ๊ธฐ(SendMessage) (0) | 2022.08.24 |
C# - ๋ค๋ฅธ ์์ฉํ๋ก๊ทธ๋จ์ ์ ์ดํด ๋ณด์. feat.SPY++ (1) | 2022.08.24 |
C# - ์ค๋ ๋์์ ์์ ฏ ์กฐ์ํ๊ธฐ (0) | 2022.08.23 |
C# - http ์์ฒญ(HttpWebRequest) (0) | 2022.06.27 |