Show / Hide Table of Contents

    Class JToken

    Represents an abstract JSON token.

    Inheritance
    System.Object
    JToken
    JContainer
    JValue
    Implements
    IJEnumerable<JToken>
    System.Collections.Generic.IEnumerable<JToken>
    System.Collections.IEnumerable
    IJsonLineInfo
    System.ICloneable
    System.Dynamic.IDynamicMetaObjectProvider
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Bayat.Json.Linq
    Assembly: Bayat.Json.Runtime.dll
    Syntax
    public abstract class JToken : IJEnumerable<JToken>, IEnumerable<JToken>, IEnumerable, IJsonLineInfo, ICloneable, IDynamicMetaObjectProvider

    Constructors

    | Improve this Doc View Source

    JToken()

    Declaration
    public JToken()

    Properties

    | Improve this Doc View Source

    EqualityComparer

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

    Declaration
    public static JTokenEqualityComparer EqualityComparer { get; }
    Property Value
    Type Description
    JTokenEqualityComparer

    A JTokenEqualityComparer that can compare two nodes for value equality.

    | Improve this Doc View Source

    First

    Get the first child token of this token.

    Declaration
    public virtual JToken First { get; }
    Property Value
    Type Description
    JToken

    A JToken containing the first child token of the JToken.

    | Improve this Doc View Source

    HasValues

    Gets a value indicating whether this token has child tokens.

    Declaration
    public abstract bool HasValues { get; }
    Property Value
    Type Description
    System.Boolean

    true if this token has child values; otherwise, false.

    | Improve this Doc View Source

    Item[Object]

    Gets the JToken with the specified key.

    Declaration
    public virtual JToken this[object key] { get; set; }
    Parameters
    Type Name Description
    System.Object key
    Property Value
    Type Description
    JToken

    The JToken with the specified key.

    | Improve this Doc View Source

    Last

    Get the last child token of this token.

    Declaration
    public virtual JToken Last { get; }
    Property Value
    Type Description
    JToken

    A JToken containing the last child token of the JToken.

    | Improve this Doc View Source

    Next

    Gets the next sibling token of this node.

    Declaration
    public JToken Next { get; set; }
    Property Value
    Type Description
    JToken

    The JToken that contains the next sibling token.

    | Improve this Doc View Source

    Parent

    Gets or sets the parent.

    Declaration
    public JContainer Parent { get; set; }
    Property Value
    Type Description
    JContainer

    The parent.

    | Improve this Doc View Source

    Path

    Gets the path of the JSON token.

    Declaration
    public string Path { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Previous

    Gets the previous sibling token of this node.

    Declaration
    public JToken Previous { get; set; }
    Property Value
    Type Description
    JToken

    The JToken that contains the previous sibling token.

    | Improve this Doc View Source

    Root

    Gets the root JToken of this JToken.

    Declaration
    public JToken Root { get; }
    Property Value
    Type Description
    JToken

    The root JToken of this JToken.

    | Improve this Doc View Source

    Type

    Gets the node type for this JToken.

    Declaration
    public abstract JTokenType Type { get; }
    Property Value
    Type Description
    JTokenType

    The type.

    Methods

    | Improve this Doc View Source

    AddAfterSelf(Object)

    Adds the specified content immediately after this token.

    Declaration
    public void AddAfterSelf(object content)
    Parameters
    Type Name Description
    System.Object content

    A content object that contains simple content or a collection of content objects to be added after this token.

    | Improve this Doc View Source

    AddAnnotation(Object)

    Adds an object to the annotation list of this JToken.

    Declaration
    public void AddAnnotation(object annotation)
    Parameters
    Type Name Description
    System.Object annotation

    The annotation to add.

    | Improve this Doc View Source

    AddBeforeSelf(Object)

    Adds the specified content immediately before this token.

    Declaration
    public void AddBeforeSelf(object content)
    Parameters
    Type Name Description
    System.Object content

    A content object that contains simple content or a collection of content objects to be added before this token.

    | Improve this Doc View Source

    AfterSelf()

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

    Declaration
    public IEnumerable<JToken> AfterSelf()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<JToken>

    A collection of the sibling tokens after this tokens, in document order.

    | Improve this Doc View Source

    Ancestors()

    Returns a collection of the ancestor tokens of this token.

    Declaration
    public IEnumerable<JToken> Ancestors()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<JToken>

    A collection of the ancestor tokens of this token.

    | Improve this Doc View Source

    AncestorsAndSelf()

    Returns a collection of tokens that contain this token, and the ancestors of this token.

    Declaration
    public IEnumerable<JToken> AncestorsAndSelf()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<JToken>

    A collection of tokens that contain this token, and the ancestors of this token.

    | Improve this Doc View Source

    Annotation(Type)

    Gets the first annotation object of the specified type from this JToken.

    Declaration
    public object Annotation(Type type)
    Parameters
    Type Name Description
    System.Type type

    The Type of the annotation to retrieve.

    Returns
    Type Description
    System.Object

    The first annotation object that matches the specified type, or null if no annotation is of the specified type.

    | Improve this Doc View Source

    Annotation<T>()

    Get the first annotation object of the specified type from this JToken.

    Declaration
    public T Annotation<T>()
        where T : class
    Returns
    Type Description
    T

    The first annotation object that matches the specified type, or null if no annotation is of the specified type.

    Type Parameters
    Name Description
    T

    The type of the annotation to retrieve.

    | Improve this Doc View Source

    Annotations(Type)

    Gets a collection of annotations of the specified type for this JToken.

    Declaration
    public IEnumerable<object> Annotations(Type type)
    Parameters
    Type Name Description
    System.Type type

    The Type of the annotations to retrieve.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.Object>

    An System.Collections.Generic.IEnumerable<T> of System.Object that contains the annotations that match the specified type for this JToken.

    | Improve this Doc View Source

    Annotations<T>()

    Gets a collection of annotations of the specified type for this JToken.

    Declaration
    public IEnumerable<T> Annotations<T>()
        where T : class
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>

    An System.Collections.Generic.IEnumerable<T> that contains the annotations for this JToken.

    Type Parameters
    Name Description
    T

    The type of the annotations to retrieve.

    | Improve this Doc View Source

    BeforeSelf()

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

    Declaration
    public IEnumerable<JToken> BeforeSelf()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<JToken>

    A collection of the sibling tokens before this token, in document order.

    | Improve this Doc View Source

    Children()

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

    Declaration
    public virtual JEnumerable<JToken> Children()
    Returns
    Type Description
    JEnumerable<JToken>

    An System.Collections.Generic.IEnumerable<T> of JToken containing the child tokens of this JToken, in document order.

    | Improve this Doc View Source

    Children<T>()

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

    Declaration
    public JEnumerable<T> Children<T>()
        where T : JToken
    Returns
    Type Description
    JEnumerable<T>

    A JEnumerable<T> containing the child tokens of this JToken, in document order.

    Type Parameters
    Name Description
    T

    The type to filter the child tokens on.

    | Improve this Doc View Source

    CloneToken()

    Declaration
    public abstract JToken CloneToken()
    Returns
    Type Description
    JToken
    | Improve this Doc View Source

    CreateReader()

    Creates an JsonReader for this token.

    Declaration
    public JsonReader CreateReader()
    Returns
    Type Description
    JsonReader

    An JsonReader that can be used to read this token and its descendants.

    | Improve this Doc View Source

    DeepClone()

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

    Declaration
    public JToken DeepClone()
    Returns
    Type Description
    JToken

    A new instance of the JToken.

    | Improve this Doc View Source

    DeepEquals(JToken)

    Declaration
    public abstract bool DeepEquals(JToken node)
    Parameters
    Type Name Description
    JToken node
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    DeepEquals(JToken, JToken)

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

    Declaration
    public static bool DeepEquals(JToken t1, JToken t2)
    Parameters
    Type Name Description
    JToken t1

    The first JToken to compare.

    JToken t2

    The second JToken to compare.

    Returns
    Type Description
    System.Boolean

    true if the tokens are equal; otherwise false.

    | Improve this Doc View Source

    FromObject(Object)

    Creates a JToken from an object.

    Declaration
    public static JToken FromObject(object o)
    Parameters
    Type Name Description
    System.Object o

    The object that will be used to create JToken.

    Returns
    Type Description
    JToken

    A JToken with the value of the specified object

    | Improve this Doc View Source

    FromObject(Object, JsonSerializer)

    Creates a JToken from an object using the specified JsonSerializer.

    Declaration
    public static JToken FromObject(object o, JsonSerializer jsonSerializer)
    Parameters
    Type Name Description
    System.Object o

    The object that will be used to create JToken.

    JsonSerializer jsonSerializer

    The JsonSerializer that will be used when reading the object.

    Returns
    Type Description
    JToken

    A JToken with the value of the specified object

    | Improve this Doc View Source

    GetAncestors(Boolean)

    Declaration
    public IEnumerable<JToken> GetAncestors(bool self)
    Parameters
    Type Name Description
    System.Boolean self
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<JToken>
    | Improve this Doc View Source

    GetDeepHashCode()

    Declaration
    public abstract int GetDeepHashCode()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    GetMetaObject(Expression)

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

    Declaration
    protected virtual DynamicMetaObject GetMetaObject(Expression parameter)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression parameter

    The expression tree representation of the runtime value.

    Returns
    Type Description
    System.Dynamic.DynamicMetaObject

    The System.Dynamic.DynamicMetaObject to bind this object.

    | Improve this Doc View Source

    Load(JsonReader)

    Creates a JToken from a JsonReader.

    Declaration
    public static JToken Load(JsonReader reader)
    Parameters
    Type Name Description
    JsonReader reader

    An JsonReader positioned at the token to read into this JToken.

    Returns
    Type Description
    JToken

    An JToken that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader.

    | Improve this Doc View Source

    Load(JsonReader, JsonLoadSettings)

    Creates a JToken from a JsonReader.

    Declaration
    public static JToken Load(JsonReader reader, JsonLoadSettings settings)
    Parameters
    Type Name Description
    JsonReader reader

    An JsonReader positioned at the token to read into this JToken.

    JsonLoadSettings settings

    The JsonLoadSettings used to load the JSON. If this is null, default load settings will be used.

    Returns
    Type Description
    JToken

    An JToken that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader.

    | Improve this Doc View Source

    Parse(String)

    Load a JToken from a string that contains JSON.

    Declaration
    public static JToken Parse(string json)
    Parameters
    Type Name Description
    System.String json

    A System.String that contains JSON.

    Returns
    Type Description
    JToken

    A JToken populated from the string that contains JSON.

    | Improve this Doc View Source

    Parse(String, JsonLoadSettings)

    Load a JToken from a string that contains JSON.

    Declaration
    public static JToken Parse(string json, JsonLoadSettings settings)
    Parameters
    Type Name Description
    System.String json

    A System.String that contains JSON.

    JsonLoadSettings settings

    The JsonLoadSettings used to load the JSON. If this is null, default load settings will be used.

    Returns
    Type Description
    JToken

    A JToken populated from the string that contains JSON.

    | Improve this Doc View Source

    ReadFrom(JsonReader)

    Creates a JToken from a JsonReader.

    Declaration
    public static JToken ReadFrom(JsonReader reader)
    Parameters
    Type Name Description
    JsonReader reader

    An JsonReader positioned at the token to read into this JToken.

    Returns
    Type Description
    JToken

    An JToken that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader.

    | Improve this Doc View Source

    ReadFrom(JsonReader, JsonLoadSettings)

    Creates a JToken from a JsonReader.

    Declaration
    public static JToken ReadFrom(JsonReader reader, JsonLoadSettings settings)
    Parameters
    Type Name Description
    JsonReader reader

    An JsonReader positioned at the token to read into this JToken.

    JsonLoadSettings settings

    The JsonLoadSettings used to load the JSON. If this is null, default load settings will be used.

    Returns
    Type Description
    JToken

    An JToken that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader.

    | Improve this Doc View Source

    Remove()

    Removes this token from its parent.

    Declaration
    public void Remove()
    | Improve this Doc View Source

    RemoveAnnotations(Type)

    Removes the annotations of the specified type from this JToken.

    Declaration
    public void RemoveAnnotations(Type type)
    Parameters
    Type Name Description
    System.Type type

    The Type of annotations to remove.

    | Improve this Doc View Source

    RemoveAnnotations<T>()

    Removes the annotations of the specified type from this JToken.

    Declaration
    public void RemoveAnnotations<T>()
        where T : class
    Type Parameters
    Name Description
    T

    The type of annotations to remove.

    | Improve this Doc View Source

    Replace(JToken)

    Replaces this token with the specified token.

    Declaration
    public void Replace(JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    | Improve this Doc View Source

    SelectToken(String)

    Selects a JToken using a JPath expression. Selects the token that matches the object path.

    Declaration
    public JToken SelectToken(string path)
    Parameters
    Type Name Description
    System.String path

    A System.String that contains a JPath expression.

    Returns
    Type Description
    JToken

    A JToken, or null.

    | Improve this Doc View Source

    SelectToken(String, Boolean)

    Selects a JToken using a JPath expression. Selects the token that matches the object path.

    Declaration
    public JToken SelectToken(string path, bool errorWhenNoMatch)
    Parameters
    Type Name Description
    System.String path

    A System.String that contains a JPath expression.

    System.Boolean errorWhenNoMatch

    A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.

    Returns
    Type Description
    JToken

    A JToken.

    | Improve this Doc View Source

    SelectTokens(String)

    Selects a collection of elements using a JPath expression.

    Declaration
    public IEnumerable<JToken> SelectTokens(string path)
    Parameters
    Type Name Description
    System.String path

    A System.String that contains a JPath expression.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<JToken>

    An System.Collections.Generic.IEnumerable<T> that contains the selected elements.

    | Improve this Doc View Source

    SelectTokens(String, Boolean)

    Selects a collection of elements using a JPath expression.

    Declaration
    public IEnumerable<JToken> SelectTokens(string path, bool errorWhenNoMatch)
    Parameters
    Type Name Description
    System.String path

    A System.String that contains a JPath expression.

    System.Boolean errorWhenNoMatch

    A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<JToken>

    An System.Collections.Generic.IEnumerable<T> that contains the selected elements.

    | Improve this Doc View Source

    SetLineInfo(IJsonLineInfo, JsonLoadSettings)

    Declaration
    public void SetLineInfo(IJsonLineInfo lineInfo, JsonLoadSettings settings)
    Parameters
    Type Name Description
    IJsonLineInfo lineInfo
    JsonLoadSettings settings
    | Improve this Doc View Source

    SetLineInfo(Int32, Int32)

    Declaration
    public void SetLineInfo(int lineNumber, int linePosition)
    Parameters
    Type Name Description
    System.Int32 lineNumber
    System.Int32 linePosition
    | Improve this Doc View Source

    ToObject(Type)

    Creates the specified .NET type from the JToken.

    Declaration
    public object ToObject(Type objectType)
    Parameters
    Type Name Description
    System.Type objectType

    The object type that the token will be deserialized to.

    Returns
    Type Description
    System.Object

    The new object created from the JSON value.

    | Improve this Doc View Source

    ToObject(Type, JsonSerializer)

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

    Declaration
    public object ToObject(Type objectType, JsonSerializer jsonSerializer)
    Parameters
    Type Name Description
    System.Type objectType

    The object type that the token will be deserialized to.

    JsonSerializer jsonSerializer

    The JsonSerializer that will be used when creating the object.

    Returns
    Type Description
    System.Object

    The new object created from the JSON value.

    | Improve this Doc View Source

    ToObject<T>()

    Creates the specified .NET type from the JToken.

    Declaration
    public T ToObject<T>()
    Returns
    Type Description
    T

    The new object created from the JSON value.

    Type Parameters
    Name Description
    T

    The object type that the token will be deserialized to.

    | Improve this Doc View Source

    ToObject<T>(JsonSerializer)

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

    Declaration
    public T ToObject<T>(JsonSerializer jsonSerializer)
    Parameters
    Type Name Description
    JsonSerializer jsonSerializer

    The JsonSerializer that will be used when creating the object.

    Returns
    Type Description
    T

    The new object created from the JSON value.

    Type Parameters
    Name Description
    T

    The object type that the token will be deserialized to.

    | Improve this Doc View Source

    ToString()

    Returns the indented JSON for this token.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    The indented JSON for this token.

    Overrides
    System.Object.ToString()
    | Improve this Doc View Source

    ToString(Formatting, JsonConverter[])

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

    Declaration
    public string ToString(Formatting formatting, params JsonConverter[] converters)
    Parameters
    Type Name Description
    Formatting formatting

    Indicates how the output is formatted.

    JsonConverter[] converters

    A collection of JsonConverter which will be used when writing the token.

    Returns
    Type Description
    System.String

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

    | Improve this Doc View Source

    Value<T>(Object)

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

    Declaration
    public virtual T Value<T>(object key)
    Parameters
    Type Name Description
    System.Object key

    The token key.

    Returns
    Type Description
    T

    The converted token value.

    Type Parameters
    Name Description
    T

    The type to convert the token to.

    | Improve this Doc View Source

    Values<T>()

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

    Declaration
    public virtual IEnumerable<T> Values<T>()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>

    A System.Collections.Generic.IEnumerable<T> containing the child values of this JToken, in document order.

    Type Parameters
    Name Description
    T

    The type to convert the values to.

    | Improve this Doc View Source

    WriteTo(JsonWriter, JsonConverter[])

    Writes this token to a JsonWriter.

    Declaration
    public abstract void WriteTo(JsonWriter writer, params JsonConverter[] converters)
    Parameters
    Type Name Description
    JsonWriter writer

    A JsonWriter into which this method will write.

    JsonConverter[] converters

    A collection of JsonConverter which will be used when writing the token.

    Operators

    | Improve this Doc View Source

    Explicit(JToken to Boolean)

    Performs an explicit conversion from JToken to System.Boolean.

    Declaration
    public static explicit operator bool (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Boolean

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Byte)

    Performs an explicit conversion from JToken to System.Byte.

    Declaration
    public static explicit operator byte (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Byte

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Byte[])

    Performs an explicit conversion from JToken to System.Byte[].

    Declaration
    public static explicit operator byte[](JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Byte[]

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Char)

    Performs an explicit conversion from JToken to System.Char.

    Declaration
    public static explicit operator char (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Char

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to DateTime)

    Performs an explicit conversion from JToken to System.DateTime.

    Declaration
    public static explicit operator DateTime(JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.DateTime

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to DateTimeOffset)

    Performs an explicit conversion from JToken to System.DateTimeOffset.

    Declaration
    public static explicit operator DateTimeOffset(JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.DateTimeOffset

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Decimal)

    Performs an explicit conversion from JToken to System.Decimal.

    Declaration
    public static explicit operator decimal (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Decimal

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Double)

    Performs an explicit conversion from JToken to System.Double.

    Declaration
    public static explicit operator double (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Double

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Guid)

    Performs an explicit conversion from JToken to System.Guid.

    Declaration
    public static explicit operator Guid(JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Guid

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Int16)

    Performs an explicit conversion from JToken to System.Int16.

    Declaration
    public static explicit operator short (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Int16

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Int32)

    Performs an explicit conversion from JToken to System.Int32.

    Declaration
    public static explicit operator int (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Int32

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Int64)

    Performs an explicit conversion from JToken to System.Int64.

    Declaration
    public static explicit operator long (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Int64

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<Boolean>)

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

    Declaration
    public static explicit operator bool? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.Boolean>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<Byte>)

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

    Declaration
    public static explicit operator byte? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.Byte>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<Char>)

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

    Declaration
    public static explicit operator char? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.Char>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<DateTime>)

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

    Declaration
    public static explicit operator DateTime? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.DateTime>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<DateTimeOffset>)

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

    Declaration
    public static explicit operator DateTimeOffset? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.DateTimeOffset>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<Decimal>)

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

    Declaration
    public static explicit operator decimal? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.Decimal>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<Double>)

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

    Declaration
    public static explicit operator double? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.Double>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<Guid>)

    Performs an explicit conversion from JToken to System.Guid.

    Declaration
    public static explicit operator Guid? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.Guid>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<Int16>)

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

    Declaration
    public static explicit operator short? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.Int16>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<Int32>)

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

    Declaration
    public static explicit operator int? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.Int32>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<Int64>)

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

    Declaration
    public static explicit operator long? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.Int64>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<SByte>)

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

    Declaration
    public static explicit operator sbyte? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.SByte>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<Single>)

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

    Declaration
    public static explicit operator float? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.Single>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<TimeSpan>)

    Performs an explicit conversion from JToken to System.TimeSpan.

    Declaration
    public static explicit operator TimeSpan? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.TimeSpan>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<UInt16>)

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

    Declaration
    public static explicit operator ushort? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.UInt16>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<UInt32>)

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

    Declaration
    public static explicit operator uint? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.UInt32>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Nullable<UInt64>)

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

    Declaration
    public static explicit operator ulong? (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Nullable<System.UInt64>

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to SByte)

    Performs an explicit conversion from JToken to System.SByte.

    Declaration
    public static explicit operator sbyte (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.SByte

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Single)

    Performs an explicit conversion from JToken to System.Single.

    Declaration
    public static explicit operator float (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Single

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to String)

    Performs an explicit conversion from JToken to System.String.

    Declaration
    public static explicit operator string (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.String

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to TimeSpan)

    Performs an explicit conversion from JToken to System.TimeSpan.

    Declaration
    public static explicit operator TimeSpan(JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.TimeSpan

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to UInt16)

    Performs an explicit conversion from JToken to System.UInt16.

    Declaration
    public static explicit operator ushort (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.UInt16

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to UInt32)

    Performs an explicit conversion from JToken to System.UInt32.

    Declaration
    public static explicit operator uint (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.UInt32

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to UInt64)

    Performs an explicit conversion from JToken to System.UInt64.

    Declaration
    public static explicit operator ulong (JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.UInt64

    The result of the conversion.

    | Improve this Doc View Source

    Explicit(JToken to Uri)

    Performs an explicit conversion from JToken to System.Uri.

    Declaration
    public static explicit operator Uri(JToken value)
    Parameters
    Type Name Description
    JToken value

    The value.

    Returns
    Type Description
    System.Uri

    The result of the conversion.

    | Improve this Doc View Source

    Implicit(Boolean to JToken)

    Performs an implicit conversion from System.Boolean to JToken.

    Declaration
    public static implicit operator JToken(bool value)
    Parameters
    Type Name Description
    System.Boolean value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Byte to JToken)

    Performs an implicit conversion from System.Byte to JToken.

    Declaration
    public static implicit operator JToken(byte value)
    Parameters
    Type Name Description
    System.Byte value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Byte[] to JToken)

    Performs an implicit conversion from System.Byte[] to JToken.

    Declaration
    public static implicit operator JToken(byte[] value)
    Parameters
    Type Name Description
    System.Byte[] value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(DateTime to JToken)

    Performs an implicit conversion from System.DateTime to JToken.

    Declaration
    public static implicit operator JToken(DateTime value)
    Parameters
    Type Name Description
    System.DateTime value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(DateTimeOffset to JToken)

    Performs an implicit conversion from System.DateTimeOffset to JToken.

    Declaration
    public static implicit operator JToken(DateTimeOffset value)
    Parameters
    Type Name Description
    System.DateTimeOffset value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Decimal to JToken)

    Performs an implicit conversion from System.Decimal to JToken.

    Declaration
    public static implicit operator JToken(decimal value)
    Parameters
    Type Name Description
    System.Decimal value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Double to JToken)

    Performs an implicit conversion from System.Double to JToken.

    Declaration
    public static implicit operator JToken(double value)
    Parameters
    Type Name Description
    System.Double value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Guid to JToken)

    Performs an implicit conversion from System.Guid to JToken.

    Declaration
    public static implicit operator JToken(Guid value)
    Parameters
    Type Name Description
    System.Guid value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Int16 to JToken)

    Performs an implicit conversion from System.Int16 to JToken.

    Declaration
    public static implicit operator JToken(short value)
    Parameters
    Type Name Description
    System.Int16 value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Int32 to JToken)

    Performs an implicit conversion from System.Int32 to JToken.

    Declaration
    public static implicit operator JToken(int value)
    Parameters
    Type Name Description
    System.Int32 value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Int64 to JToken)

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

    Declaration
    public static implicit operator JToken(long value)
    Parameters
    Type Name Description
    System.Int64 value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<Boolean> to JToken)

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

    Declaration
    public static implicit operator JToken(bool? value)
    Parameters
    Type Name Description
    System.Nullable<System.Boolean> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<Byte> to JToken)

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

    Declaration
    public static implicit operator JToken(byte? value)
    Parameters
    Type Name Description
    System.Nullable<System.Byte> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<DateTime> to JToken)

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

    Declaration
    public static implicit operator JToken(DateTime? value)
    Parameters
    Type Name Description
    System.Nullable<System.DateTime> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<DateTimeOffset> to JToken)

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

    Declaration
    public static implicit operator JToken(DateTimeOffset? value)
    Parameters
    Type Name Description
    System.Nullable<System.DateTimeOffset> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<Decimal> to JToken)

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

    Declaration
    public static implicit operator JToken(decimal? value)
    Parameters
    Type Name Description
    System.Nullable<System.Decimal> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<Double> to JToken)

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

    Declaration
    public static implicit operator JToken(double? value)
    Parameters
    Type Name Description
    System.Nullable<System.Double> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<Guid> to JToken)

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

    Declaration
    public static implicit operator JToken(Guid? value)
    Parameters
    Type Name Description
    System.Nullable<System.Guid> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<Int16> to JToken)

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

    Declaration
    public static implicit operator JToken(short? value)
    Parameters
    Type Name Description
    System.Nullable<System.Int16> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<Int32> to JToken)

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

    Declaration
    public static implicit operator JToken(int? value)
    Parameters
    Type Name Description
    System.Nullable<System.Int32> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<Int64> to JToken)

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

    Declaration
    public static implicit operator JToken(long? value)
    Parameters
    Type Name Description
    System.Nullable<System.Int64> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<SByte> to JToken)

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

    Declaration
    public static implicit operator JToken(sbyte? value)
    Parameters
    Type Name Description
    System.Nullable<System.SByte> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<Single> to JToken)

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

    Declaration
    public static implicit operator JToken(float? value)
    Parameters
    Type Name Description
    System.Nullable<System.Single> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<TimeSpan> to JToken)

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

    Declaration
    public static implicit operator JToken(TimeSpan? value)
    Parameters
    Type Name Description
    System.Nullable<System.TimeSpan> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<UInt16> to JToken)

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

    Declaration
    public static implicit operator JToken(ushort? value)
    Parameters
    Type Name Description
    System.Nullable<System.UInt16> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<UInt32> to JToken)

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

    Declaration
    public static implicit operator JToken(uint? value)
    Parameters
    Type Name Description
    System.Nullable<System.UInt32> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Nullable<UInt64> to JToken)

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

    Declaration
    public static implicit operator JToken(ulong? value)
    Parameters
    Type Name Description
    System.Nullable<System.UInt64> value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(SByte to JToken)

    Performs an implicit conversion from System.SByte to JToken.

    Declaration
    public static implicit operator JToken(sbyte value)
    Parameters
    Type Name Description
    System.SByte value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Single to JToken)

    Performs an implicit conversion from System.Single to JToken.

    Declaration
    public static implicit operator JToken(float value)
    Parameters
    Type Name Description
    System.Single value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(String to JToken)

    Performs an implicit conversion from System.String to JToken.

    Declaration
    public static implicit operator JToken(string value)
    Parameters
    Type Name Description
    System.String value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(TimeSpan to JToken)

    Performs an implicit conversion from System.TimeSpan to JToken.

    Declaration
    public static implicit operator JToken(TimeSpan value)
    Parameters
    Type Name Description
    System.TimeSpan value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(UInt16 to JToken)

    Performs an implicit conversion from System.UInt16 to JToken.

    Declaration
    public static implicit operator JToken(ushort value)
    Parameters
    Type Name Description
    System.UInt16 value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(UInt32 to JToken)

    Performs an implicit conversion from System.UInt32 to JToken.

    Declaration
    public static implicit operator JToken(uint value)
    Parameters
    Type Name Description
    System.UInt32 value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(UInt64 to JToken)

    Performs an implicit conversion from System.UInt64 to JToken.

    Declaration
    public static implicit operator JToken(ulong value)
    Parameters
    Type Name Description
    System.UInt64 value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    | Improve this Doc View Source

    Implicit(Uri to JToken)

    Performs an implicit conversion from System.Uri to JToken.

    Declaration
    public static implicit operator JToken(Uri value)
    Parameters
    Type Name Description
    System.Uri value

    The value to create a JValue from.

    Returns
    Type Description
    JToken

    The JValue initialized with the specified value.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IJsonLineInfo.HasLineInfo()

    Declaration
    bool IJsonLineInfo.HasLineInfo()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IJsonLineInfo.LineNumber

    Declaration
    int IJsonLineInfo.LineNumber { get; }
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    IJsonLineInfo.LinePosition

    Declaration
    int IJsonLineInfo.LinePosition { get; }
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    IJEnumerable<JToken>.Item[Object]

    Declaration
    IJEnumerable<JToken> IJEnumerable<JToken>.this[object key] { get; }
    Parameters
    Type Name Description
    System.Object key
    Returns
    Type Description
    IJEnumerable<JToken>
    | Improve this Doc View Source

    IEnumerable<JToken>.GetEnumerator()

    Declaration
    IEnumerator<JToken> IEnumerable<JToken>.GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<JToken>
    | Improve this Doc View Source

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator
    | Improve this Doc View Source

    IDynamicMetaObjectProvider.GetMetaObject(Expression)

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

    Declaration
    DynamicMetaObject IDynamicMetaObjectProvider.GetMetaObject(Expression parameter)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression parameter

    The expression tree representation of the runtime value.

    Returns
    Type Description
    System.Dynamic.DynamicMetaObject

    The System.Dynamic.DynamicMetaObject to bind this object.

    | Improve this Doc View Source

    ICloneable.Clone()

    Declaration
    object ICloneable.Clone()
    Returns
    Type Description
    System.Object

    Implements

    IJEnumerable<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    IJsonLineInfo
    System.ICloneable
    System.Dynamic.IDynamicMetaObjectProvider

    Extension Methods

    Extensions.Ancestors<T>(IEnumerable<T>)
    Extensions.AncestorsAndSelf<T>(IEnumerable<T>)
    Extensions.Values(IEnumerable<JToken>, Object)
    Extensions.Values(IEnumerable<JToken>)
    Extensions.Values<U>(IEnumerable<JToken>, Object)
    Extensions.Values<U>(IEnumerable<JToken>)
    Extensions.Value<U>(IEnumerable<JToken>)
    Extensions.Value<T, U>(IEnumerable<T>)
    Extensions.Values<T, U>(IEnumerable<T>, Object)
    Extensions.Children<T>(IEnumerable<T>)
    Extensions.Children<T, U>(IEnumerable<T>)
    Extensions.Convert<T, U>(IEnumerable<T>)
    Extensions.Convert<T, U>(T)
    Extensions.AsJEnumerable(IEnumerable<JToken>)
    Extensions.AsJEnumerable<T>(IEnumerable<T>)
    CollectionUtils.ContainsValue<TSource>(IEnumerable<TSource>, TSource, IEqualityComparer<TSource>)
    CollectionUtils.IndexOf<T>(IEnumerable<T>, Func<T, Boolean>)
    DynamicUtils.GetDynamicMemberNames(IDynamicMetaObjectProvider)
    StringUtils.ForgivingCaseSensitiveFind<TSource>(IEnumerable<TSource>, Func<TSource, String>, String)
    StringExtensions.ToSeparatedString(IEnumerable, String)
    StringExtensions.ToCommaSeparatedString(IEnumerable)
    StringExtensions.ToLineSeparatedString(IEnumerable)
    • Improve this Doc
    • View Source
    • 0 Comments