Closed tunguski closed 7 years ago
Can you try with { "N": {"$numberLong": "27096761719904980000"}}
See https://docs.mongodb.com/manual/reference/mongodb-extended-json/#numberlong
Yes, I assume it will work. For the fields I'm working with even simpler will be serialize them to string. I don't need to treat them as numbers in mongo. Still I need to implement this change in multiple places.
So I would like to be sure what is the reason. Is this as expected because a) it is a mongo restriction, b) it is a restheart limitation, c) or it is a bug, d) something else.
Could you tell me what is your view on that?
Thanks in advance!
There was quite a debate in the mongodb community about this issue, especially after some changes introduced by the Java driver release 3.x.
My opinion is that RESTHeart must stick to how the Java driver handles BSON serialization and deserialization as much as possible, or keeping our releases in synch with driver's would become excessively complex.
Below some references:
https://jira.mongodb.org/browse/DRIVERS-167 https://jira.mongodb.org/browse/JAVA-1272 https://jira.mongodb.org/browse/JAVA-1280 https://jira.mongodb.org/browse/JAVA-2173
I'm closing this, if you have additional questions feel free to re-open.
During tests I've found this response:
Mentioned value seems to be a proper number regarding to JSON specification. I tried to find something about possible limitations in documentation (json, restheart), but did not find anything.
Is it a bug or am I missing something?