Skip to content

Feat: Added Data encoder and decoder#28

Merged
Andrew-Lees11 merged 8 commits intomasterfrom
QueryDataCoder
Aug 24, 2018
Merged

Feat: Added Data encoder and decoder#28
Andrew-Lees11 merged 8 commits intomasterfrom
QueryDataCoder

Conversation

@Andrew-Lees11
Copy link
Copy Markdown
Contributor

@Andrew-Lees11 Andrew-Lees11 commented Jul 16, 2018

This PR adds an encode from data and decode from data to our QueryEncoder and QueryDecoder. This is required so the coders fit our BodyEncoder/Decoder protocol for our custom decoders branch.

Since this encourages users to use the same encoder/decoder for multiple uses we also made them thread safe.

The file String+Extensions is requires and so has been added to extensions. We may want to make TypeAliases in Kitura to avoid code duplication.

Cyclic tests for Data have been added where a codable type is encoded and then decoded back to its original type.

@Andrew-Lees11 Andrew-Lees11 merged commit a8212e7 into master Aug 24, 2018
@ianpartridge ianpartridge deleted the QueryDataCoder branch August 24, 2018 10:36
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