Description
Is your feature request related to a problem? Please describe.
util-dynamodb currently throws error when date is passed.
Refs: #1531
Describe the solution you'd like
The problem is with JSON spec itself: there is no literal syntax for dates in JSON.
JSON spec: https://www.ietf.org/rfc/rfc4627.txt
Possible solution #1: Convert dates to ISO 8601 strings by default. Provide an option (say convertDateToNumber
) which converts date to a string value. This option can be passed along with convertEmptyValues
Possible solution #2: Expose pre-marshall configuration allowing users to send their own convert functions, detailed in #1533
Describe alternatives you've considered
Converting dates to String/Number or a different format before passing it to the converter.
Additional context
This request was raised in PR #1531 (comment)