JToken
public abstract class JToken : IJEnumerable<JToken>, IEnumerable<JToken>, IEnumerable, IJsonLineInfo, ICloneable, IDynamicMetaObjectProvider
Represents an abstract JSON token.
Gets a comparer that can compare two tokens for value equality.
Get the first child token of this token.
Gets a value indicating whether this token has child tokens.
Gets the JToken with the specified key.
Get the last child token of this token.
Gets the next sibling token of this node.
Gets or sets the parent.
Gets the path of the JSON token.
Gets the previous sibling token of this node.
Gets the node type for this JToken.
Compares the values of two tokens, including the values of all descendant tokens.
Creates a JToken from an object.
Creates a JToken from an object using the specified JsonSerializer.
Creates a JToken from a JsonReader.
Creates a JToken from a JsonReader.
public static Task<JToken> LoadAsync(JsonReader reader, CancellationToken cancellationToken = default)
Asynchronously creates a JToken from a JsonReader.
public static Task<JToken> LoadAsync(JsonReader reader, JsonLoadSettings settings, CancellationToken cancellationToken = default)
Asynchronously creates a JToken from a JsonReader.
Performs an explicit conversion from JToken to DateTimeOffset.
Performs an implicit conversion from DateTimeOffset to JToken.
Load a JToken from a string that contains JSON.
Load a JToken from a string that contains JSON.
Creates a JToken from a JsonReader.
Creates a JToken from a JsonReader.
public static Task<JToken> ReadFromAsync(JsonReader reader, CancellationToken cancellationToken = default)
Asynchronously creates a JToken from a JsonReader.
public static Task<JToken> ReadFromAsync(JsonReader reader, JsonLoadSettings settings, CancellationToken cancellationToken = default)
Asynchronously creates a JToken from a JsonReader.
Adds the specified content immediately after this token.
Adds an object to the annotation list of this JToken.
Adds the specified content immediately before this token.
Returns a collection of the sibling tokens after this token, in document order.
Returns a collection of the ancestor tokens of this token.
Returns a collection of tokens that contain this token, and the ancestors of this token.
Get the first annotation object of the specified type from this JToken.
Gets the first annotation object of the specified type from this JToken.
Gets a collection of annotations of the specified type for this JToken.
Gets a collection of annotations of the specified type for this JToken.
Returns a collection of the sibling tokens before this token, in document order.
Returns a collection of the child tokens of this token, in document order.
Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
Creates a JsonReader for this token.
Creates a new instance of the JToken. All child tokens are recursively cloned.
Returns the DynamicMetaObject responsible for binding operations performed on this object.
Removes this token from its parent.
Removes the annotations of the specified type from this JToken.
Removes the annotations of the specified type from this JToken.
Replaces this token with the specified token.
Selects a JToken using a JPath expression. Selects the token that matches the object path.
Selects a JToken using a JPath expression. Selects the token that matches the object path.
Selects a collection of elements using a JPath expression.
Selects a collection of elements using a JPath expression.
Creates an instance of the specified .NET type from the JToken.
Creates an instance of the specified .NET type from the JToken.
Creates an instance of the specified .NET type from the JToken using the specified JsonSerializer.
Creates an instance of the specified .NET type from the JToken using the specified JsonSerializer.
Returns the JSON for this token using the given formatting and converters.
Gets the JToken with the specified key converted to the specified type.
Returns a collection of the child values of this token, in document order.
Writes this token to a JsonWriter.
public virtual Task WriteToAsync(JsonWriter writer, CancellationToken cancellationToken, JsonConverter[] converters)
Writes this token to a JsonWriter asynchronously.
Writes this token to a JsonWriter asynchronously.