C#寫了個Http方式獲取時序資料庫一張表中內容,主要代碼
public static string Get(string uri, string username, string password)
{
string result = string.Empty;
WebClient client = new WebClient();
if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password))
{
client.Credentials = GetCredentialCache(uri, username, password);
client.Headers.Add("Authorization", GetAuthorization(username, password));
}
return client.DownloadString(uri);
}
呼叫結果回傳字串
{"results":[{"statement_id":0,"series":[{"name":"currentConnections","columns":["time","value"],"values":[["2019-12-19T08:01:54Z",10]]}]}]}
請問大神這是標準json字串格式嗎?如何轉成Model類?
這是資料庫查詢內容

轉載請註明出處,本文鏈接:https://www.uj5u.com/net/85089.html
標籤:C#
下一篇:visionpro C#聯合編程
