Although toJsonForLog() may return output conforming to EJSON, we don't want to guarantee that it is and stays EJSON.
The main objectives of this function are:
- serialize JavaScript values for logging and debugging
- return a valid JSON string
- add type information for selected non-native JSON types (native types are Boolean, Number, String, Object, Array, null)
- detect recursive objects to avoid recursing forever
- is duplicated by
-
SERVER-101531 Rename toEJSON or remove it
-
- Closed
-