<PackageReference Include="Newtonsoft.Json" Version="4.0.4" />

JToken

Represents an abstract JSON token.

Gets a comparer that can compare two tokens for value equality.

public virtual JToken First { get; }

Get the first child token of this token.

public abstract bool HasValues { get; }

Gets a value indicating whether this token has childen tokens.

public virtual JToken this[object key] { get; set; }

Gets the JToken with the specified key.

public virtual JToken Last { get; }

Get the last child token of this token.

public JToken Next { get; }

Gets the next sibling token of this node.

public JContainer Parent { get; }

Gets or sets the parent.

public JToken Previous { get; }

Gets the previous sibling token of this node.

public JToken Root { get; }

Gets the root JToken of this JToken.

public abstract JTokenType Type { get; }

Gets the node type for this JToken.

public static bool DeepEquals(JToken t1, JToken t2)

Compares the values of two tokens, including the values of all descendant tokens.

public static JToken FromObject(object o)

Creates a JToken from an object.

public static JToken FromObject(object o, JsonSerializer jsonSerializer)

Creates a JToken from an object using the specified JsonSerializer.

public static JToken Load(JsonReader reader)

Creates a JToken from a JsonReader.

public static bool op_Explicit(JToken value)

Performs an explicit conversion from JToken to Boolean.

public static DateTimeOffset op_Explicit(JToken value)

Performs an explicit conversion from JToken to DateTimeOffset.

public static bool? op_Explicit(JToken value)

Performs an explicit conversion from JToken to Nullable<T>.

public static long op_Explicit(JToken value)

Performs an explicit conversion from JToken to Int64.

public static DateTime? op_Explicit(JToken value)

Performs an explicit conversion from JToken to Nullable<T>.

public static DateTimeOffset? op_Explicit(JToken value)

Performs an explicit conversion from JToken to Nullable<T>.

public static decimal? op_Explicit(JToken value)

Performs an explicit conversion from JToken to Nullable<T>.

public static double? op_Explicit(JToken value)

Performs an explicit conversion from JToken to Nullable<T>.

public static int op_Explicit(JToken value)

Performs an explicit conversion from JToken to Int32.

public static short op_Explicit(JToken value)

Performs an explicit conversion from JToken to Int16.

public static ushort op_Explicit(JToken value)

Performs an explicit conversion from JToken to UInt16.

public static int? op_Explicit(JToken value)

Performs an explicit conversion from JToken to Nullable<T>.

public static short? op_Explicit(JToken value)

Performs an explicit conversion from JToken to Nullable<T>.

public static ushort? op_Explicit(JToken value)

Performs an explicit conversion from JToken to Nullable<T>.

public static DateTime op_Explicit(JToken value)

Performs an explicit conversion from JToken to DateTime.

public static long? op_Explicit(JToken value)

Performs an explicit conversion from JToken to Nullable<T>.

public static float? op_Explicit(JToken value)

Performs an explicit conversion from JToken to Nullable<T>.

public static decimal op_Explicit(JToken value)

Performs an explicit conversion from JToken to Decimal.

public static uint? op_Explicit(JToken value)

Performs an explicit conversion from JToken to Nullable<T>.

public static ulong? op_Explicit(JToken value)

Performs an explicit conversion from JToken to Nullable<T>.

public static double op_Explicit(JToken value)

Performs an explicit conversion from JToken to Double.

public static float op_Explicit(JToken value)

Performs an explicit conversion from JToken to Single.

public static string op_Explicit(JToken value)

Performs an explicit conversion from JToken to String.

public static uint op_Explicit(JToken value)

Performs an explicit conversion from JToken to UInt32.

public static ulong op_Explicit(JToken value)

Performs an explicit conversion from JToken to UInt64.

public static byte[] op_Explicit(JToken value)

Performs an explicit conversion from JToken to Byte[].

public static JToken op_Implicit(bool value)

Performs an implicit conversion from Boolean to JToken.

public static JToken op_Implicit(DateTimeOffset value)

Performs an implicit conversion from DateTimeOffset to JToken.

public static JToken op_Implicit(bool? value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(long value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(DateTime? value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(DateTimeOffset? value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(decimal? value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(double? value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(short value)

Performs an implicit conversion from Int16 to JToken.

public static JToken op_Implicit(ushort value)

Performs an implicit conversion from UInt16 to JToken.

public static JToken op_Implicit(int value)

Performs an implicit conversion from Int32 to JToken.

public static JToken op_Implicit(int? value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(DateTime value)

Performs an implicit conversion from DateTime to JToken.

public static JToken op_Implicit(long? value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(float? value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(decimal value)

Performs an implicit conversion from Decimal to JToken.

public static JToken op_Implicit(short? value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(ushort? value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(uint? value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(ulong? value)

Performs an implicit conversion from Nullable<T> to JToken.

public static JToken op_Implicit(double value)

Performs an implicit conversion from Double to JToken.

public static JToken op_Implicit(float value)

Performs an implicit conversion from Single to JToken.

public static JToken op_Implicit(string value)

Performs an implicit conversion from String to JToken.

public static JToken op_Implicit(uint value)

Performs an implicit conversion from UInt32 to JToken.

public static JToken op_Implicit(ulong value)

Performs an implicit conversion from UInt64 to JToken.

public static JToken op_Implicit(byte[] value)

Performs an implicit conversion from Byte[] to JToken.

public static JToken Parse(string json)

Load a JToken from a string that contains JSON.

public static JToken ReadFrom(JsonReader reader)

Creates a JToken from a JsonReader.

public void AddAfterSelf(object content)

Adds the specified content immediately after this token.

public void AddBeforeSelf(object content)

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 the sibling tokens before this token, in document order.

public virtual JEnumerable<JToken> Children()

Returns a collection of the child tokens of this token, in document order.

public JEnumerable<T> Children<T>() where T : JToken

Returns a collection of the child tokens of this token, in document order, filtered by the specified type.

Creates an JsonReader for this token.

public JToken DeepClone()

Creates a new instance of the JToken. All child tokens are recursively cloned.

protected virtual DynamicMetaObject GetMetaObject(Expression parameter)

Returns the DynamicMetaObject responsible for binding operations performed on this object.

public void Remove()

Removes this token from its parent.

public void Replace(JToken value)

Replaces this token with the specified token.

public JToken SelectToken(string path)

Selects the token that matches the object path.

public JToken SelectToken(string path, bool errorWhenNoMatch)

Selects the token that matches the object path.

public T ToObject<T>()

Creates the specified .NET type from the JToken.

public T ToObject<T>(JsonSerializer jsonSerializer)

Creates the specified .NET type from the JToken using the specified JsonSerializer.

public string ToString(Formatting formatting, JsonConverter[] converters)

Returns the JSON for this token using the given formatting and converters.

public virtual T Value<T>(object key)

Gets the JToken with the specified key converted to the specified type.

public virtual IEnumerable<T> Values<T>()

Returns a collection of the child values of this token, in document order.

public abstract void WriteTo(JsonWriter writer, JsonConverter[] converters)

Writes this token to a JsonWriter.