Class JValue
Represents a value in JSON (string, integer, date, etc).
Inheritance
System.Object
JValue
Implements
System.Collections.Generic.IEnumerable <
JToken >
System.Collections.IEnumerable
System.ICloneable
System.Dynamic.IDynamicMetaObjectProvider
System.IFormattable
System.IComparable
System.IConvertible
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
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
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
|
Improve this Doc
View Source
Type
Gets the node type for this JToken .
Declaration
public override JTokenType Type { get; }
Property Value
Overrides
|
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
Overrides
|
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
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()
Declaration
public static JValue CreateNull()
Returns
|
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
|
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
|
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
|
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
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
|
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
|
Improve this Doc
View Source
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
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[])
Declaration
public override void WriteTo(JsonWriter writer, params JsonConverter[] converters)
Parameters
Overrides
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
Declaration
bool IConvertible.ToBoolean(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.Boolean
|
Improve this Doc
View Source
Declaration
byte IConvertible.ToByte(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.Byte
|
Improve this Doc
View Source
Declaration
char IConvertible.ToChar(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.Char
|
Improve this Doc
View Source
Declaration
DateTime IConvertible.ToDateTime(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.DateTime
|
Improve this Doc
View Source
Declaration
decimal IConvertible.ToDecimal(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.Decimal
|
Improve this Doc
View Source
Declaration
double IConvertible.ToDouble(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.Double
|
Improve this Doc
View Source
Declaration
short IConvertible.ToInt16(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.Int16
|
Improve this Doc
View Source
Declaration
int IConvertible.ToInt32(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.Int32
|
Improve this Doc
View Source
Declaration
long IConvertible.ToInt64(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.Int64
|
Improve this Doc
View Source
Declaration
sbyte IConvertible.ToSByte(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.SByte
|
Improve this Doc
View Source
Declaration
float IConvertible.ToSingle(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.Single
|
Improve this Doc
View Source
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
Declaration
ushort IConvertible.ToUInt16(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.UInt16
|
Improve this Doc
View Source
Declaration
uint IConvertible.ToUInt32(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.UInt32
|
Improve this Doc
View Source
Declaration
ulong IConvertible.ToUInt64(IFormatProvider provider)
Parameters
Type
Name
Description
System.IFormatProvider
provider
Returns
Type
Description
System.UInt64
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.ICloneable
System.Dynamic.IDynamicMetaObjectProvider
System.IFormattable
System.IComparable
System.IEquatable<T>
System.IComparable<T>
System.IConvertible
Extension Methods
Please enable JavaScript to view the comments powered by Disqus.