JsonObject 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public ref class JsonObject : System::Json::JsonValue, System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<System::String ^, System::Json::JsonValue ^>>, System::Collections::Generic::IDictionary<System::String ^, System::Json::JsonValue ^>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Json::JsonValue ^>>
public class JsonObject : System.Json.JsonValue, System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,System.Json.JsonValue>>, System.Collections.Generic.IDictionary<string,System.Json.JsonValue>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Json.JsonValue>>
type JsonObject = class
inherit JsonValue
interface IDictionary<string, JsonValue>
interface ICollection<KeyValuePair<string, JsonValue>>
interface seq<KeyValuePair<string, JsonValue>>
interface IEnumerable
Public Class JsonObject
Inherits JsonValue
Implements ICollection(Of KeyValuePair(Of String, JsonValue)), IDictionary(Of String, JsonValue), IEnumerable(Of KeyValuePair(Of String, JsonValue))
- 繼承
- 實作
-
ICollection<KeyValuePair<String,JsonValue>> ICollection<KeyValuePair<TKey,TValue>> IDictionary<String,JsonValue> IEnumerable<KeyValuePair<String,JsonValue>> IEnumerable<KeyValuePair<TKey,TValue>> IEnumerable<T> IEnumerable
備註
注意
命名空間 System.Json 是針對不再支援的 Silverlight 所設計。 若要處理 JSON,建議您改用 命名空間中的 System.Text.Json API。
建構函式
JsonObject(IEnumerable<KeyValuePair<String,JsonValue>>) | |
JsonObject(KeyValuePair<String,JsonValue>[]) |
屬性
Count |
取得 ICollection<T> 中所包含的項目數。 |
Item[Int32] | (繼承來源 JsonValue) |
Item[String] |
取得或設定具有指定索引鍵的項目。 |
JsonType | |
Keys |
取得 ICollection<T>,包含 IDictionary<TKey,TValue> 的索引鍵。 |
Values |
取得 ICollection<T>,包含 IDictionary<TKey,TValue> 中的值。 |
方法
Add(KeyValuePair<String,JsonValue>) |
將項目加入至 ICollection<T>。 |
Add(String, JsonValue) |
將隨附有索引鍵和值的項目加入至 IDictionary<TKey,TValue>。 |
AddRange(IEnumerable<KeyValuePair<String,JsonValue>>) | |
AddRange(KeyValuePair<String,JsonValue>[]) | |
Clear() |
從 ICollection<T> 中移除所有項目。 |
ContainsKey(String) |
判斷 IDictionary<TKey,TValue> 是否包含具有指定之索引鍵的項目。 |
CopyTo(KeyValuePair<String,JsonValue>[], Int32) |
從特定的 ICollection<T> 索引開始,將 Array 的項目複製到 Array。 |
Equals(Object) |
判斷指定的物件是否等於目前的物件。 (繼承來源 Object) |
GetEnumerator() |
傳回逐一查看集合的列舉值。 |
GetHashCode() |
做為預設雜湊函式。 (繼承來源 Object) |
GetType() |
取得目前執行個體的 Type。 (繼承來源 Object) |
MemberwiseClone() |
建立目前 Object 的淺層複製。 (繼承來源 Object) |
Remove(String) |
從 IDictionary<TKey,TValue> 中移除具有指定之索引鍵的項目。 |
Save(Stream) | |
Save(TextWriter) | (繼承來源 JsonValue) |
ToString() | (繼承來源 JsonValue) |
TryGetValue(String, JsonValue) |
明確介面實作
擴充方法
AsReadOnly<TKey,TValue>(IDictionary<TKey,TValue>) |
傳回目前字典的唯讀 ReadOnlyDictionary<TKey,TValue> 包裝函式。 |
CopyToDataTable<T>(IEnumerable<T>) |
根據輸入 DataTable 物件 (其中泛型參數 |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) |
根據輸入 DataRow 物件 (其中泛型參數 |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) |
根據輸入 DataRow 物件 (其中泛型參數 |
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應