-
Type: Task
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
NODE-4221 Description
How are you using Mongo? What version of the server and driver are you using?
Have a client-side application where I want to serialize raw data using the extended-json in order to send data to the backend. That data contains objects with explicit undefined values. I also may have a case where the data contains explicit null values
{zig: "zag", foo: undefined, bar: null}
What is the feature/improvement you would like?
I would like to be able to serialize the above with EJSON.stringify to
{zig: "zag", bar: null}
Ideally the EJSON options includes an `ignoreUndefined` property like the regular serialize function.
What use case would this feature/improvement enable?
More explicit intention in encoding/serializing with the EJSON API
Current workaround is to have some singleton represent values I would actually want as null, and have a replacer handle converting them to null and excluding undefines.
- is depended on by
-
NODE-4221 EJSON stringify support ignoreUndefined
- Backlog