Whenever I retrieve a Document from Mongo that contains a Long value, stored in the Bson format NumberLong, and try to parse it to Json using the Document.toJson method, it returns incorrectly formatted Json.
Instead of receiving Json in the following form:
I receive Json in the following form:
None of the suggested fixes online work, I am not sure what the equivalent is for customizing the JsonWriterSettings as is suggested for the Java driver.
If someone could tell me if this is a bug or a how to fix this I would appreciate it, currently we are manually fixing the error with Json4s which is not ideal.