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? 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
The PreciseDate class has been constructed to mimic the same behaviour as JSS payload when it comes to dates.
PreciseDate
By acception a base key name, it allows the reconstruction of the 3 original keys for any date, like that:
{ "example_date": "XXX", "example_date_epoch": 0, "example_date_utc": "XXX+0500" }
If those keys were embedded in a single key it would have been much more simple to reconstruct the json before sending it to JSS.
An updated payload:
{ "example_date": { "date": "XXX", "epoch": 0, "utc": "XXX+0500" } }
Which in turn would improve the injection of each date in any JSON payload.
How it's currently done:
if let exampleDate = exampleDate { json.merge(exampleDate.toJSON()) { (_, new) in new } }
Currently, this solution is problematic since the test coverage can't make it inside the block.
Find a better way of generating / injecting any date's JSON into another JSON payload.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Context
The
PreciseDate
class has been constructed to mimic the same behaviour as JSS payload when it comes to dates.By acception a base key name, it allows the reconstruction of the 3 original keys for any date, like that:
If those keys were embedded in a single key it would have been much more simple to reconstruct the json before sending it to JSS.
An updated payload:
Which in turn would improve the injection of each date in any JSON payload.
How it's currently done:
Currently, this solution is problematic since the test coverage can't make it inside the block.
Issue
Find a better way of generating / injecting any date's JSON into another JSON payload.
The text was updated successfully, but these errors were encountered: