JValue
JValue class
Signature
Dim myJValue As JValue
Summary
A JSON value: a string, a number, true/false, or null.
Parameters
None
Remarks
The typed properties convert with the rules of the getters described under `JNode.GetString`, without a default.
Not created directly; returned by other members of the library.
| Member | Kind | Summary |
|---|---|---|
| `LongValue` | Property | Returns the value as Long. |
| `DoubleValue` | Property | Returns the value as Double. |
| `CurrencyValue` | Property | Returns the value as Currency. |
| `DecimalValue` | Property | Returns the value as a Decimal Variant. |
| `DateValue` | Property | Returns the value as Date, read from an ISO 8601 string. |
| `BooleanValue` | Property | Returns the value as Boolean. |
Code example
None
Inheritance
JValue inherits every member of `JNode`; inherited members are described on the base class's page.
LongValue property
Signature
Property Get LongValue() As Long
Summary
Returns the value as Long.
Parameters
None
Property value: Long – The value; a number with a fraction raises jeTypeMismatch.
Remarks
Read-only.
Code example
None
Inheritance
Declared by JValue.
DoubleValue property
Signature
Property Get DoubleValue() As Double
Summary
Returns the value as Double.
Parameters
None
Property value: Double – The value, rounded to the nearest Double; a number beyond the Double range raises jeTypeMismatch (see `JNode.GetDouble`).
Remarks
Read-only.
Code example
None
Inheritance
Declared by JValue.
CurrencyValue property
Signature
Property Get CurrencyValue() As Currency
Summary
Returns the value as Currency.
Parameters
None
Property value: Currency – The value, converted from the written text and rounded to four decimal places.
Remarks
Read-only.
Code example
None
Inheritance
Declared by JValue.
DecimalValue property
Signature
Property Get DecimalValue() As Variant
Summary
Returns the value as a Decimal Variant.
Parameters
None
Property value: Variant – The value, converted from the written text, rounded to 28-29 significant digits; a magnitude below 1E-28 becomes 0.
Remarks
Read-only.
Code example
None
Inheritance
Declared by JValue.
DateValue property
Signature
Property Get DateValue() As Date
Summary
Returns the value as Date, read from an ISO 8601 string.
Parameters
None
Property value: Date – The date; a time with a zone is converted as the document's DateZone says.
Remarks
Read-only.
Code example
None
Inheritance
Declared by JValue.
BooleanValue property
Signature
Property Get BooleanValue() As Boolean
Summary
Returns the value as Boolean.
Parameters
None
Property value: Boolean – The value, read with the rules of GetBoolean: JSON true/false, a number (0 after the conversion to Decimal is False, every other number True), or the text “true”/“false” in any case and with spaces around it; anything else raises jeTypeMismatch.
Remarks
Read-only.
Code example
None
Inheritance
Declared by JValue.