API reference

JsonObject Class

Extends JsonNode, IEnumerable< KeyValuePair< string, JsonNode > >
Mutable JSON object backed by an ordered dictionary.
Replaces Newtonsoft.Json.Linq.JObject.

Constructors

JsonObject ()
Signature
JsonObject()

Properties

Count : int
[Get]
Signature
int Count
HasValues : bool
[Get]
Signature
bool HasValues
this[string key] : override JsonNode
[Get][Set]
Signature
override JsonNode this[string key]
Type : override JsonNodeType
[Get]
Signature
override JsonNodeType Type

Methods

ContainsKey ( key )
Signature
bool ContainsKey(string key)
Parameters
key: string
Returns
bool
GetEnumerator ()
Signature
IEnumerator< KeyValuePair< string, JsonNode > > GetEnumerator()
Returns
IEnumerator< KeyValuePair< string, JsonNode > >
Properties ()
Signature
IEnumerable< JsonObjectProperty > Properties()
Returns
IEnumerable< JsonObjectProperty >
Remove ( key )
Signature
void Remove(string key)
Parameters
key: string
Returns
void
ToJsonString ( indented , depth )
Signature
override string ToJsonString(bool indented=false, int depth=0)
Parameters
indented: bool
depth: int
Returns
override string
TryGetValue ( key , value )
Signature
bool TryGetValue(string key, out JsonNode value)
Parameters
key: string
value: out JsonNode
Returns
bool
TryGetValue ( key , comparison , value )
Signature
bool TryGetValue(string key, StringComparison comparison, out JsonNode value)
Parameters
key: string
comparison: StringComparison
value: out JsonNode
Returns
bool
Values< T > ()
Signature
IEnumerable< T > Values< T >()
Returns
IEnumerable< T >

Static Methods

FromObject ( obj , settings )
Signature
static JsonObject FromObject(object obj, McpJsonSettings settings=null)
Parameters
obj: object
settings: McpJsonSettings
Returns
JsonObject
Parse ( json )
Signature
static new JsonObject Parse(string json)
Parameters
json: string
Returns
new JsonObject