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

JSON deserialization fails for timestamps without fractional seconds #174

Closed
palpatim opened this issue Nov 27, 2019 · 1 comment · Fixed by #201
Closed

JSON deserialization fails for timestamps without fractional seconds #174

palpatim opened this issue Nov 27, 2019 · 1 comment · Fixed by #201
Assignees

Comments

@palpatim
Copy link
Member

To reproduce:

  • Use a schema with an AWSDateTime field
  • Create a record with a valid ISO8601 date, but without a fractional second, as in: 2019-11-27T03:10:52Z
  • Attempt to deserialize the record, as by doing a "get" query operation

Expected results:

  • The record deserializes properly into an object

Actual results:

  • Transformation error:
    dataCorrupted(Swift.DecodingError.Context(codingPath: [_JSONKey(stringValue: "Index 269", intValue: 269), CodingKeys(stringValue: "updatedAt", intValue: nil)], debugDescription: "Date string does not match format expected by formatter.", underlyingError: nil))
    
@lawmicha lawmicha self-assigned this Nov 27, 2019
@palpatim palpatim assigned palpatim and unassigned lawmicha Dec 2, 2019
@palpatim
Copy link
Member Author

palpatim commented Dec 2, 2019

Fixing this as part of my data sync work

palpatim added a commit that referenced this issue Dec 2, 2019
- Local ingestion/sync engine cleanup & refactoring; more local ingestion
  conflict resolution unit tests
- Handle deletion sync
- Convert delete callback to @escaping to allow for saving mutation events
- Make LogLevel Comparable
- Enable SQL statement trace for logLevel == .verbose
- Fix JSON decoding errors
- Default date encoding for Models is now ISO8601 with fractional seconds
  Fixes #174
- Feedback from previous PR
palpatim added a commit that referenced this issue Dec 2, 2019
- Local ingestion/sync engine cleanup & refactoring; more local ingestion
  conflict resolution unit tests
- Handle deletion sync
- Convert delete callback to @escaping to allow for saving mutation events
- Make LogLevel Comparable
- Enable SQL statement trace for logLevel == .verbose
- Fix JSON decoding errors
- Default date encoding for Models is now ISO8601 with fractional seconds
  Fixes #174
- Feedback from previous PR
palpatim added a commit that referenced this issue Dec 2, 2019
- Local ingestion/sync engine cleanup & refactoring; more local ingestion
  conflict resolution unit tests
- Handle deletion sync
- Convert delete callback to @escaping to allow for saving mutation events
- Make LogLevel Comparable
- Enable SQL statement trace for logLevel == .verbose
- Fix JSON decoding errors
- Default date encoding for Models is now ISO8601 with fractional seconds
  Fixes #174
- Feedback from previous PR
palpatim added a commit that referenced this issue Dec 2, 2019
- Local ingestion/sync engine cleanup & refactoring; more local ingestion
  conflict resolution unit tests
- Handle deletion sync
- Convert delete callback to @escaping to allow for saving mutation events
- Make LogLevel Comparable
- Enable SQL statement trace for logLevel == .verbose
- Fix JSON decoding errors
- Default date encoding for Models is now ISO8601 with fractional seconds
  Fixes #174
- Feedback from previous PR
palpatim added a commit that referenced this issue Dec 2, 2019
- Local ingestion/sync engine cleanup & refactoring; more local ingestion
  conflict resolution unit tests
- Handle deletion sync
- Convert delete callback to @escaping to allow for saving mutation events
- Make LogLevel Comparable
- Enable SQL statement trace for logLevel == .verbose
- Fix JSON decoding errors
- Default date encoding for Models is now ISO8601 with fractional seconds
  (Fixes #174)
- Fix unstable LocalSubscriptionTests by using NoOpMutationQueue to prevent
  'syncMutationToCloud' from being called; disabled unimplemented tests
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 a pull request may close this issue.

2 participants