We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
When sending Date objects, they are serialized into ISO string format, and JSON parse doesn't convert them back.
Propose to add option to JSON decode function, for example
const dateFormat = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/; function dateReviver(key, value) { if (typeof value === "string" && dateFormat.test(value)) { return new Date(value); } return value; } module.exports.decode = function(str) { return JSON.parse(str, dateReviver) }
The text was updated successfully, but these errors were encountered:
How about adding EJSON support?
Sorry, something went wrong.
No branches or pull requests
When sending Date objects, they are serialized into ISO string format, and JSON parse doesn't convert them back.
Propose to add option to JSON decode function, for example
The text was updated successfully, but these errors were encountered: