Show / Hide Table of Contents

    Class JValue

    Represents a value in JSON (string, integer, date, etc).

    Inheritance
    System.Object
    JToken
    JValue
    JRaw
    Implements
    IJEnumerable<JToken>
    System.Collections.Generic.IEnumerable<JToken>
    System.Collections.IEnumerable
    IJsonLineInfo
    System.ICloneable
    System.Dynamic.IDynamicMetaObjectProvider
    System.IFormattable
    System.IComparable
    System.IEquatable<JValue>
    System.IComparable<JValue>
    System.IConvertible
    Inherited Members
    JToken.EqualityComparer
    JToken.Parent
    JToken.Root
    JToken.DeepEquals(JToken, JToken)
    JToken.Next
    JToken.Previous
    JToken.Path
    JToken.AddAfterSelf(Object)
    JToken.AddBeforeSelf(Object)
    JToken.Ancestors()
    JToken.AncestorsAndSelf()
    JToken.GetAncestors(Boolean)
    JToken.AfterSelf()
    JToken.BeforeSelf()
    JToken.Item[Object]
    JToken.Value<T>(Object)
    JToken.First
    JToken.Last
    JToken.Children()
    JToken.Children<T>()
    JToken.Values<T>()
    JToken.Remove()
    JToken.Replace(JToken)
    JToken.ToString(Formatting, JsonConverter[])
    JToken.IEnumerable.GetEnumerator()
    JToken.IEnumerable<JToken>.GetEnumerator()
    JToken.IJEnumerable<JToken>.Item[Object]
    JToken.CreateReader()
    JToken.FromObject(Object)
    JToken.FromObject(Object, JsonSerializer)
    JToken.ToObject<T>()
    JToken.ToObject(Type)
    JToken.ToObject<T>(JsonSerializer)
    JToken.ToObject(Type, JsonSerializer)
    JToken.ReadFrom(JsonReader)
    JToken.ReadFrom(JsonReader, JsonLoadSettings)
    JToken.Parse(String)
    JToken.Parse(String, JsonLoadSettings)
    JToken.Load(JsonReader, JsonLoadSettings)
    JToken.Load(JsonReader)
    JToken.SetLineInfo(IJsonLineInfo, JsonLoadSettings)
    JToken.SetLineInfo(Int32, Int32)
    JToken.IJsonLineInfo.HasLineInfo()
    JToken.IJsonLineInfo.LineNumber
    JToken.IJsonLineInfo.LinePosition
    JToken.SelectToken(String)
    JToken.SelectToken(String, Boolean)
    JToken.SelectTokens(String)
    JToken.SelectTokens(String, Boolean)
    JToken.IDynamicMetaObjectProvider.GetMetaObject(Expression)
    JToken.ICloneable.Clone()
    JToken.DeepClone()
    JToken.AddAnnotation(Object)
    JToken.Annotation<T>()
    JToken.Annotation(Type)
    JToken.Annotations<T>()
    JToken.Annotations(Type)
    JToken.RemoveAnnotations<T>()
    JToken.RemoveAnnotations(Type)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Bayat.Json.Linq
    Assembly: Bayat.Json.Runtime.dll
    Syntax
    public class JValue : JToken, IJEnumerable<JToken>, IEnumerable<JToken>, IEnumerable, IJsonLineInfo, ICloneable, IDynamicMetaObjectProvider, IFormattable, IComparable, IEquatable<JValue>, IComparable<JValue>, IConvertible

    Constructors

    | Improve this Doc View Source

    JValue(JValue)

    Initializes a new instance of the JValue class from another JValue object.

    Declaration
    public JValue(JValue other)
    Parameters
    Type Name Description
    JValue other

    A JValue object to copy from.

    | Improve this Doc View Source

    JValue(Boolean)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(bool value)
    Parameters
    Type Name Description
    System.Boolean value

    The value.

    | Improve this Doc View Source

    JValue(Char)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(char value)
    Parameters
    Type Name Description
    System.Char value

    The value.

    | Improve this Doc View Source

    JValue(DateTime)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(DateTime value)
    Parameters
    Type Name Description
    System.DateTime value

    The value.

    | Improve this Doc View Source

    JValue(DateTimeOffset)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(DateTimeOffset value)
    Parameters
    Type Name Description
    System.DateTimeOffset value

    The value.

    | Improve this Doc View Source

    JValue(Decimal)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(decimal value)
    Parameters
    Type Name Description
    System.Decimal value

    The value.

    | Improve this Doc View Source

    JValue(Double)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(double value)
    Parameters
    Type Name Description
    System.Double value

    The value.

    | Improve this Doc View Source

    JValue(Guid)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(Guid value)
    Parameters
    Type Name Description
    System.Guid value

    The value.

    | Improve this Doc View Source

    JValue(Int64)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(long value)
    Parameters
    Type Name Description
    System.Int64 value

    The value.

    | Improve this Doc View Source

    JValue(Object)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(object value)
    Parameters
    Type Name Description
    System.Object value

    The value.

    | Improve this Doc View Source

    JValue(Object, JTokenType)

    Declaration
    public JValue(object value, JTokenType type)
    Parameters
    Type Name Description
    System.Object value
    JTokenType type
    | Improve this Doc View Source

    JValue(Single)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(float value)
    Parameters
    Type Name Description
    System.Single value

    The value.

    | Improve this Doc View Source

    JValue(String)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(string value)
    Parameters
    Type Name Description
    System.String value

    The value.

    | Improve this Doc View Source

    JValue(TimeSpan)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(TimeSpan value)
    Parameters
    Type Name Description
    System.TimeSpan value

    The value.

    | Improve this Doc View Source

    JValue(UInt64)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(ulong value)
    Parameters
    Type Name Description
    System.UInt64 value

    The value.

    | Improve this Doc View Source

    JValue(Uri)

    Initializes a new instance of the JValue class with the given value.

    Declaration
    public JValue(Uri value)
    Parameters
    Type Name Description
    System.Uri value

    The value.

    Properties

    | Improve this Doc View Source

    HasValues

    Gets a value indicating whether this token has child tokens.

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

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

    Overrides
    JToken.HasValues
    | Improve this Doc View Source

    Type

    Gets the node type for this JToken.

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

    The type.

    Overrides
    JToken.Type
    | Improve this Doc View Source

    Value

    Gets or sets the underlying token value.

    Declaration
    public object Value { get; set; }
    Property Value
    Type Description
    System.Object

    The underlying token value.

    Methods

    | Improve this Doc View Source

    CloneToken()

    Declaration
    public override JToken CloneToken()
    Returns
    Type Description
    JToken
    Overrides
    JToken.CloneToken()
    | Improve this Doc View Source

    Compare(JTokenType, Object, Object)

    Declaration
    public static int Compare(JTokenType valueType, object objA, object objB)
    Parameters
    Type Name Description
    JTokenType valueType
    System.Object objA
    System.Object objB
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    CompareTo(JValue)

    Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

    Declaration
    public int CompareTo(JValue obj)
    Parameters
    Type Name Description
    JValue obj

    An object to compare with this instance.

    Returns
    Type Description
    System.Int32

    A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than obj. Zero This instance is equal to obj. Greater than zero This instance is greater than obj.

    Exceptions
    Type Condition
    System.ArgumentException

    obj is not the same type as this instance.

    | Improve this Doc View Source

    CreateComment(String)

    Creates a JValue comment with the given value.

    Declaration
    public static JValue CreateComment(string value)
    Parameters
    Type Name Description
    System.String value

    The value.

    Returns
    Type Description
    JValue

    A JValue comment with the given value.

    | Improve this Doc View Source

    CreateNull()

    Creates a JValue null value.

    Declaration
    public static JValue CreateNull()
    Returns
    Type Description
    JValue

    A JValue null value.

    | Improve this Doc View Source

    CreateString(String)

    Creates a JValue string with the given value.

    Declaration
    public static JValue CreateString(string value)
    Parameters
    Type Name Description
    System.String value

    The value.

    Returns
    Type Description
    JValue

    A JValue string with the given value.

    | Improve this Doc View Source

    CreateUndefined()

    Creates a JValue undefined value.

    Declaration
    public static JValue CreateUndefined()
    Returns
    Type Description
    JValue

    A JValue undefined value.

    | Improve this Doc View Source

    DeepEquals(JToken)

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

    Equals(JValue)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(JValue other)
    Parameters
    Type Name Description
    JValue other

    An object to compare with this object.

    Returns
    Type Description
    System.Boolean

    true if the current object is equal to the other parameter; otherwise, false.

    | Improve this Doc View Source

    Equals(Object)

    Determines whether the specified System.Object is equal to the current System.Object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The System.Object to compare with the current System.Object.

    Returns
    Type Description
    System.Boolean

    true if the specified System.Object is equal to the current System.Object; otherwise, false.

    Overrides
    System.Object.Equals(System.Object)
    Exceptions
    Type Condition
    System.NullReferenceException

    The obj parameter is null.

    | Improve this Doc View Source

    GetDeepHashCode()

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

    GetHashCode()

    Serves as a hash function for a particular type.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for the current System.Object.

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

    GetMetaObject(Expression)

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

    Declaration
    protected override 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.

    Overrides
    JToken.GetMetaObject(Expression)
    | Improve this Doc View Source

    ToString()

    Returns a System.String that represents this instance.

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

    A System.String that represents this instance.

    Overrides
    JToken.ToString()
    | Improve this Doc View Source

    ToString(IFormatProvider)

    Returns a System.String that represents this instance.

    Declaration
    public string ToString(IFormatProvider formatProvider)
    Parameters
    Type Name Description
    System.IFormatProvider formatProvider

    The format provider.

    Returns
    Type Description
    System.String

    A System.String that represents this instance.

    | Improve this Doc View Source

    ToString(String)

    Returns a System.String that represents this instance.

    Declaration
    public string ToString(string format)
    Parameters
    Type Name Description
    System.String format

    The format.

    Returns
    Type Description
    System.String

    A System.String that represents this instance.

    | Improve this Doc View Source

    ToString(String, IFormatProvider)

    Returns a System.String that represents this instance.

    Declaration
    public string ToString(string format, IFormatProvider formatProvider)
    Parameters
    Type Name Description
    System.String format

    The format.

    System.IFormatProvider formatProvider

    The format provider.

    Returns
    Type Description
    System.String

    A System.String that represents this instance.

    | Improve this Doc View Source

    WriteTo(JsonWriter, JsonConverter[])

    Writes this token to a JsonWriter.

    Declaration
    public override 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.

    Overrides
    JToken.WriteTo(JsonWriter, JsonConverter[])

    Explicit Interface Implementations

    | Improve this Doc View Source

    IComparable.CompareTo(Object)

    Declaration
    int IComparable.CompareTo(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    IConvertible.GetTypeCode()

    Declaration
    TypeCode IConvertible.GetTypeCode()
    Returns
    Type Description
    System.TypeCode
    | Improve this Doc View Source

    IConvertible.ToBoolean(IFormatProvider)

    Declaration
    bool IConvertible.ToBoolean(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IConvertible.ToByte(IFormatProvider)

    Declaration
    byte IConvertible.ToByte(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.Byte
    | Improve this Doc View Source

    IConvertible.ToChar(IFormatProvider)

    Declaration
    char IConvertible.ToChar(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.Char
    | Improve this Doc View Source

    IConvertible.ToDateTime(IFormatProvider)

    Declaration
    DateTime IConvertible.ToDateTime(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.DateTime
    | Improve this Doc View Source

    IConvertible.ToDecimal(IFormatProvider)

    Declaration
    decimal IConvertible.ToDecimal(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.Decimal
    | Improve this Doc View Source

    IConvertible.ToDouble(IFormatProvider)

    Declaration
    double IConvertible.ToDouble(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.Double
    | Improve this Doc View Source

    IConvertible.ToInt16(IFormatProvider)

    Declaration
    short IConvertible.ToInt16(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.Int16
    | Improve this Doc View Source

    IConvertible.ToInt32(IFormatProvider)

    Declaration
    int IConvertible.ToInt32(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    IConvertible.ToInt64(IFormatProvider)

    Declaration
    long IConvertible.ToInt64(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.Int64
    | Improve this Doc View Source

    IConvertible.ToSByte(IFormatProvider)

    Declaration
    sbyte IConvertible.ToSByte(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.SByte
    | Improve this Doc View Source

    IConvertible.ToSingle(IFormatProvider)

    Declaration
    float IConvertible.ToSingle(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.Single
    | Improve this Doc View Source

    IConvertible.ToType(Type, IFormatProvider)

    Declaration
    object IConvertible.ToType(Type conversionType, IFormatProvider provider)
    Parameters
    Type Name Description
    System.Type conversionType
    System.IFormatProvider provider
    Returns
    Type Description
    System.Object
    | Improve this Doc View Source

    IConvertible.ToUInt16(IFormatProvider)

    Declaration
    ushort IConvertible.ToUInt16(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.UInt16
    | Improve this Doc View Source

    IConvertible.ToUInt32(IFormatProvider)

    Declaration
    uint IConvertible.ToUInt32(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.UInt32
    | Improve this Doc View Source

    IConvertible.ToUInt64(IFormatProvider)

    Declaration
    ulong IConvertible.ToUInt64(IFormatProvider provider)
    Parameters
    Type Name Description
    System.IFormatProvider provider
    Returns
    Type Description
    System.UInt64

    Implements

    IJEnumerable<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    IJsonLineInfo
    System.ICloneable
    System.Dynamic.IDynamicMetaObjectProvider
    System.IFormattable
    System.IComparable
    System.IEquatable<T>
    System.IComparable<T>
    System.IConvertible

    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