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>) |
在给定其泛型参数 |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) |
在给定其泛型参数 |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) |
在给定其泛型参数 |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈