Class JObject
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: Newtonsoft.Json.dll
Syntax
public class JObject : Newtonsoft.Json.Linq.JContainer, System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,Newtonsoft.Json.Linq.JToken>>, System.Collections.Generic.IDictionary<string,Newtonsoft.Json.Linq.JToken>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Newtonsoft.Json.Linq.JToken>>, System.ComponentModel.ICustomTypeDescriptor, System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.INotifyPropertyChanging
Constructors
JObject()
Declaration
public JObject ();
JObject(JObject)
JObject(Object)
JObject(Object[])
Properties
ChildrenTokens
Declaration
protected override System.Collections.Generic.IList<Newtonsoft.Json.Linq.JToken> ChildrenTokens { get; }
Property Value
IList<JToken>
|
Item[String]
Declaration
public Newtonsoft.Json.Linq.JToken this[string propertyName] { get; set; }
Parameters
String
propertyName
|
Property Value
JToken
|
Item[Object]
Declaration
public override Newtonsoft.Json.Linq.JToken this[object key] { get; set; }
Parameters
Object
key
|
Property Value
JToken
|
Type
Methods
Add(String, JToken)
Declaration
public void Add (string propertyName, Newtonsoft.Json.Linq.JToken value);
Parameters
String
propertyName
|
JToken
value
|
FromObject(Object)
Declaration
public static Newtonsoft.Json.Linq.JObject FromObject (object o);
Parameters
Object
o
|
Returns
JObject
|
FromObject(Object, JsonSerializer)
Declaration
public static Newtonsoft.Json.Linq.JObject FromObject (object o, Newtonsoft.Json.JsonSerializer jsonSerializer);
Parameters
Object
o
|
JsonSerializer
jsonSerializer
|
Returns
JObject
|
GetEnumerator()
Declaration
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Newtonsoft.Json.Linq.JObject/<GetEnumerator>d__61))]
public System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string,Newtonsoft.Json.Linq.JToken>> GetEnumerator ();
Returns
IEnumerator<KeyValuePair<String,JToken>>
|
GetMetaObject(Expression)
Declaration
protected override System.Dynamic.DynamicMetaObject GetMetaObject (System.Linq.Expressions.Expression parameter);
Parameters
Expression
parameter
|
Returns
DynamicMetaObject
|
GetValue(String)
Declaration
public Newtonsoft.Json.Linq.JToken GetValue (string propertyName);
Parameters
String
propertyName
|
Returns
JToken
|
GetValue(String, StringComparison)
Declaration
public Newtonsoft.Json.Linq.JToken GetValue (string propertyName, StringComparison comparison);
Parameters
String
propertyName
|
StringComparison
comparison
|
Returns
JToken
|
Load(JsonReader)
Declaration
public static Newtonsoft.Json.Linq.JObject Load (Newtonsoft.Json.JsonReader reader);
Parameters
JsonReader
reader
|
Returns
JObject
|
Load(JsonReader, JsonLoadSettings)
Declaration
public static Newtonsoft.Json.Linq.JObject Load (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings);
Parameters
JsonReader
reader
|
JsonLoadSettings
settings
|
Returns
JObject
|
LoadAsync(JsonReader, CancellationToken)
Declaration
public static System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JObject> LoadAsync (Newtonsoft.Json.JsonReader reader, System.Threading.CancellationToken cancellationToken = null);
Parameters
JsonReader
reader
|
CancellationToken
cancellationToken
|
Returns
Task<JObject>
|
LoadAsync(JsonReader, JsonLoadSettings, CancellationToken)
Declaration
public static System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JObject> LoadAsync (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings, System.Threading.CancellationToken cancellationToken = null);
Parameters
JsonReader
reader
|
JsonLoadSettings
settings
|
CancellationToken
cancellationToken
|
Returns
Task<JObject>
|
OnPropertyChanged(String)
Declaration
protected virtual void OnPropertyChanged (string propertyName);
Parameters
String
propertyName
|
OnPropertyChanging(String)
Declaration
protected virtual void OnPropertyChanging (string propertyName);
Parameters
String
propertyName
|
Parse(String)
Declaration
public static Newtonsoft.Json.Linq.JObject Parse (string json);
Parameters
String
json
|
Returns
JObject
|
Parse(String, JsonLoadSettings)
Declaration
public static Newtonsoft.Json.Linq.JObject Parse (string json, Newtonsoft.Json.Linq.JsonLoadSettings settings);
Parameters
String
json
|
JsonLoadSettings
settings
|
Returns
JObject
|
Properties()
Declaration
public System.Collections.Generic.IEnumerable<Newtonsoft.Json.Linq.JProperty> Properties ();
Returns
IEnumerable<JProperty>
|
Property(String)
Declaration
public Newtonsoft.Json.Linq.JProperty Property (string name);
Parameters
String
name
|
Returns
JProperty
|
PropertyValues()
Declaration
public Newtonsoft.Json.Linq.JEnumerable<Newtonsoft.Json.Linq.JToken> PropertyValues ();
Returns
JEnumerable<JToken>
|
Remove(String)
Declaration
public bool Remove (string propertyName);
Parameters
String
propertyName
|
Returns
Boolean
|
TryGetValue(String, StringComparison, JToken)
Declaration
public bool TryGetValue (string propertyName, StringComparison comparison, out Newtonsoft.Json.Linq.JToken value);
Parameters
String
propertyName
|
StringComparison
comparison
|
JToken
value
|
Returns
Boolean
|
TryGetValue(String, JToken)
Declaration
public bool TryGetValue (string propertyName, out Newtonsoft.Json.Linq.JToken value);
Parameters
String
propertyName
|
JToken
value
|
Returns
Boolean
|
WriteTo(JsonWriter, JsonConverter[])
Declaration
public override void WriteTo (Newtonsoft.Json.JsonWriter writer, params Newtonsoft.Json.JsonConverter[] converters);
Parameters
JsonWriter
writer
|
JsonConverter[]
converters
|
WriteToAsync(JsonWriter, CancellationToken, JsonConverter[])
Declaration
public override System.Threading.Tasks.Task WriteToAsync (Newtonsoft.Json.JsonWriter writer, System.Threading.CancellationToken cancellationToken, params Newtonsoft.Json.JsonConverter[] converters);
Parameters
JsonWriter
writer
|
CancellationToken
cancellationToken
|
JsonConverter[]
converters
|
Returns
Task
|
Events
PropertyChanged
Declaration
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
PropertyChanging
Declaration
public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
Explicit Interface Implementations
ICollection<KeyValuePair<String,JToken>>.Add(KeyValuePair<String,JToken>)
Declaration
void ICollection<KeyValuePair<string,JToken>>.Add (System.Collections.Generic.KeyValuePair<string,Newtonsoft.Json.Linq.JToken> item);
Parameters
KeyValuePair<String,JToken>
item
|
ICollection<KeyValuePair<String,JToken>>.Clear()
Declaration
void ICollection<KeyValuePair<string,JToken>>.Clear ();
ICollection<KeyValuePair<String,JToken>>.Contains(KeyValuePair<String,JToken>)
Declaration
bool ICollection<KeyValuePair<string,JToken>>.Contains (System.Collections.Generic.KeyValuePair<string,Newtonsoft.Json.Linq.JToken> item);
Parameters
KeyValuePair<String,JToken>
item
|
Returns
Boolean
|
ICollection<KeyValuePair<String,JToken>>.CopyTo(KeyValuePair<String,JToken>[], Int32)
Declaration
void ICollection<KeyValuePair<string,JToken>>.CopyTo (System.Collections.Generic.KeyValuePair<string,Newtonsoft.Json.Linq.JToken>[] array, int arrayIndex);
Parameters
KeyValuePair<String,JToken>[]
array
|
Int32
arrayIndex
|
ICollection<KeyValuePair<String,JToken>>.IsReadOnly
Declaration
bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,Newtonsoft.Json.Linq.JToken>>.IsReadOnly { get; }
Returns
Boolean
|
ICollection<KeyValuePair<String,JToken>>.Remove(KeyValuePair<String,JToken>)
Declaration
bool ICollection<KeyValuePair<string,JToken>>.Remove (System.Collections.Generic.KeyValuePair<string,Newtonsoft.Json.Linq.JToken> item);
Parameters
KeyValuePair<String,JToken>
item
|
Returns
Boolean
|
IDictionary<String,JToken>.ContainsKey(String)
Declaration
bool IDictionary<string,JToken>.ContainsKey (string key);
Parameters
String
key
|
Returns
Boolean
|
IDictionary<String,JToken>.Keys
Declaration
System.Collections.Generic.ICollection<string> System.Collections.Generic.IDictionary<System.String,Newtonsoft.Json.Linq.JToken>.Keys { get; }
Returns
ICollection<String>
|
IDictionary<String,JToken>.Values
Declaration
System.Collections.Generic.ICollection<Newtonsoft.Json.Linq.JToken> System.Collections.Generic.IDictionary<System.String,Newtonsoft.Json.Linq.JToken>.Values { get; }
Returns
ICollection<JToken>
|
ICustomTypeDescriptor.GetAttributes()
Declaration
System.ComponentModel.AttributeCollection ICustomTypeDescriptor.GetAttributes ();
Returns
AttributeCollection
|
ICustomTypeDescriptor.GetClassName()
ICustomTypeDescriptor.GetComponentName()
ICustomTypeDescriptor.GetConverter()
Declaration
System.ComponentModel.TypeConverter ICustomTypeDescriptor.GetConverter ();
Returns
TypeConverter
|
ICustomTypeDescriptor.GetDefaultEvent()
Declaration
System.ComponentModel.EventDescriptor ICustomTypeDescriptor.GetDefaultEvent ();
Returns
EventDescriptor
|
ICustomTypeDescriptor.GetDefaultProperty()
Declaration
System.ComponentModel.PropertyDescriptor ICustomTypeDescriptor.GetDefaultProperty ();
Returns
PropertyDescriptor
|
ICustomTypeDescriptor.GetEditor(Type)
Declaration
object ICustomTypeDescriptor.GetEditor (Type editorBaseType);
Parameters
Type
editorBaseType
|
Returns
Object
|
ICustomTypeDescriptor.GetEvents()
Declaration
System.ComponentModel.EventDescriptorCollection ICustomTypeDescriptor.GetEvents ();
Returns
EventDescriptorCollection
|
ICustomTypeDescriptor.GetEvents(Attribute[])
Declaration
System.ComponentModel.EventDescriptorCollection ICustomTypeDescriptor.GetEvents (Attribute[] attributes);
Parameters
Attribute[]
attributes
|
Returns
EventDescriptorCollection
|
ICustomTypeDescriptor.GetProperties()
Declaration
System.ComponentModel.PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties ();
Returns
PropertyDescriptorCollection
|
ICustomTypeDescriptor.GetProperties(Attribute[])
Declaration
System.ComponentModel.PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties (Attribute[] attributes);
Parameters
Attribute[]
attributes
|
Returns
PropertyDescriptorCollection
|
ICustomTypeDescriptor.GetPropertyOwner(PropertyDescriptor)
Declaration
object ICustomTypeDescriptor.GetPropertyOwner (System.ComponentModel.PropertyDescriptor pd);
Parameters
PropertyDescriptor
pd
|
Returns
Object
|