Couchbase Integer filed - Issue

Hi Team,
Just wanted to know about Integer field scenario in CB. Lets’ say i have a field in a doc - “Sal” and i am trying to put value as below
“Sal”: 4000 - is fine
“Sal”:04000 - document is becoming as binary document- may be it is because Octal representation, but why document is becoming binary one?

Only way to to have “0” prefix then converting this a as a string ?

Thanks.

starting leading zero is not valid integer in JSON unless it is decimal. Checkout https://www.json.org/json-en.html

I agree vs1 but why this document become binary when we try to put “Sal”: 04000, can’t it convert into 4000. we have tried in the Couchbase web ui - by adding new document. Just curious.

Don’t know about the document , where do find it. The field becomes binary. Because field value not valid JSON, so it will be binary.