Skip to content

Provide support to serialize dates in util-dynamodb #1534

Closed
@trivikr

Description

@trivikr

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestNew feature or enhancement. May require GitHub community feedback.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions