Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: consider timestamp format for JSON protocol serialization #3182

Merged
merged 1 commit into from
Nov 4, 2020

Conversation

lawmicha
Copy link
Member

Issue #, if available:
The JSON protocol (Rest-JSON, JSON 1.1) serialization ignores the timestampFormat trait of timestamp shapes in c2j model which causes it to default to unixTimetsamp format instead of the prescribed format.

Description of changes:
These changes add support for timestampFormat trait for JSON protocols. It also abstracts out the handling of timestamp shape serialization for different serialization protocols as they tend to share similar implementations.
Added tests around these changes for various protocols.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The JSON protocol (Rest-JSON, JSON 1.1) serialization ignores the timestampFormat trait of timestamp shapes in c2j model which causes it to default to unixTimetsamp format instead of the prescribed format.

These changes add support for timestampFormat trait for JSON protocols. It also abstracts out the handling of timestamp shape serialization for different serialization protocols as they tend to share similar implementations.
Added tests around these changes for various protocols.
@lawmicha lawmicha self-assigned this Oct 30, 2020
Copy link
Contributor

@phani-srikar phani-srikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of these changes are already reviewed in the staging repo. A fix was applied on top of those changes for deserialization in RestJSON protocol. These changes are tested for RestJSON serialization/deserialization through a sample app. Other protocols were only unit tested.

@lawmicha lawmicha merged commit 186bf57 into develop Nov 4, 2020
@lawmicha lawmicha deleted the fix/timestamp branch November 4, 2020 15:55
gabek pushed a commit to KeepSafe/aws-sdk-ios that referenced this pull request Aug 31, 2023
…mplify#3182)

The JSON protocol (Rest-JSON, JSON 1.1) serialization ignores the timestampFormat trait of timestamp shapes in c2j model which causes it to default to unixTimetsamp format instead of the prescribed format.

These changes add support for timestampFormat trait for JSON protocols. It also abstracts out the handling of timestamp shape serialization for different serialization protocols as they tend to share similar implementations.
Added tests around these changes for various protocols.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants