Is there anyone who had noted that Couchbase changes the numerical value of a property, over a certain limit, when recording a Json document?
Here is an example. For this test, I use the live input via the couchbase web interface.
The property "inputValue" corresponds to the value entered in the property "valueAfterSave" before clicking the save button.
The property "valueAfterSave" corresponds to the value after the save.
To a number with 16 digits, it's good:
{
"inputValue": "1234567890123456",
"valueAfterSave": 1234567890123456
}
But from 17 digits, the system begins to change the value:
{
"inputValue": "12345678901234567",
"valueAfterSave": 12345678901234568
}
or
{
"inputValue": "12345678901234599",
"valueAfterSave": 12345678901234600
}
or
{
"inputValue": "12345678901234567890",
"valueAfterSave": 12345678901234567000
}
Just out of curiosity with 40 digits
{
"inputValue": "1234567890123456789012345678901234567890",
"valueAfterSave": 1.234567890123457e+39
}
This behavior is specified somewhere? Is there a way to change it ?. There is the solution through String values but I admit that I'm curious.
I use Couchbase Server 2.1.0 on Windows 7 Pro 32-bit platform.