JsonObject 類別

定義

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))
繼承
JsonObject
實作

備註

注意

命名空間 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)

明確介面實作

ICollection<KeyValuePair<String,JsonValue>>.Contains(KeyValuePair<String,JsonValue>)

判斷 ICollection<T> 是否包含特定值。

ICollection<KeyValuePair<String,JsonValue>>.IsReadOnly

取得值,指出 ICollection<T> 是否唯讀。

ICollection<KeyValuePair<String,JsonValue>>.Remove(KeyValuePair<String,JsonValue>)

ICollection<T> 移除特定物件之第一個符合的元素。

IEnumerable.GetEnumerator()

傳回逐一查看集合的列舉值。

擴充方法

AsReadOnly<TKey,TValue>(IDictionary<TKey,TValue>)

傳回目前字典的唯讀 ReadOnlyDictionary<TKey,TValue> 包裝函式。

CopyToDataTable<T>(IEnumerable<T>)

根據輸入 DataTable 物件 (其中泛型參數 TDataRow) 傳回包含 IEnumerable<T> 物件複本的 DataRow

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 IEnumerable<T> 物件複製到指定的 DataRow

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 IEnumerable<T> 物件複製到指定的 DataRow

適用於