Class JProperty
- Namespace
- Newtonsoft.Json.Linq
- Assembly
- Newtonsoft.Json.dll
Represents a JSON property.
public class JProperty : JContainer, IJEnumerable<JToken>, IJsonLineInfo, ICloneable, IList<JToken>, ICollection<JToken>, IEnumerable<JToken>, ITypedList, IBindingList, IList, ICollection, IEnumerable
- Inheritance
-
JProperty
- Implements
- Inherited Members
- Extension Methods
Constructors
JProperty(JProperty)
public JProperty(JProperty other)
Parameters
JProperty(string, object)
Initializes a new instance of the JProperty class.
public JProperty(string name, object content)
Parameters
JProperty(string, params object[])
Initializes a new instance of the JProperty class.
public JProperty(string name, params object[] content)
Parameters
Properties
ChildrenTokens
Gets the container's children tokens.
protected override IList<JToken> ChildrenTokens { get; }
Property Value
Name
Gets the property name.
public string Name { get; }
Property Value
- string
The property name.
Type
Gets the node type for this JToken.
public override JTokenType Type { get; }
Property Value
- JTokenType
The type.
Value
Gets or sets the property value.
public JToken Value { get; set; }
Property Value
- JToken
The property value.
Methods
Load(JsonReader)
Loads an JProperty from a JsonReader.
public static JProperty Load(JsonReader reader)
Parameters
reader
JsonReaderA JsonReader that will be read for the content of the JProperty.
Returns
- JProperty
A JProperty that contains the JSON that was read from the specified JsonReader.
WriteTo(JsonWriter, params JsonConverter[])
Writes this token to a JsonWriter.
public override void WriteTo(JsonWriter writer, params JsonConverter[] converters)
Parameters
writer
JsonWriterA JsonWriter into which this method will write.
converters
JsonConverter[]A collection of JsonConverter which will be used when writing the token.