Initializes a new JsonValue struct that represents a number.
An implicit conversion from the double type also exists.
Some .NET numeric types such as long and decimal are not recommended to be encoded as JSON numbers.
Use the ToJson extension methods if you still want to do so.
See the Remarks section for details.
See the Remarks section for details.
Namespace: KGySoft.Json
Assembly: KGySoft.Json (in KGySoft.Json.dll) Version: 2.0.1
Syntax
Parameters
- value
- Type: SystemDouble
The value to initialize the JsonValue from.
Remarks
![]() |
---|
The JavaScript Number type is always a double-precision 64-bit binary format IEEE 754 value, which is the equivalent of the double type in C#. It is not recommended to store C# long and decimal types as JavaScript numbers because their precision might be lost silently if the JSON is processed by JavaScript. |
![]() |
---|
|
See Also