Skip to content

Custom JSONEncoder for Router#1221

Closed
tib wants to merge 3 commits intoKitura:masterfrom
tib:master
Closed

Custom JSONEncoder for Router#1221
tib wants to merge 3 commits intoKitura:masterfrom
tib:master

Conversation

@tib
Copy link
Copy Markdown

@tib tib commented Feb 21, 2018

Description

How Has This Been Tested?

Created a new test case to see if a custom date strategy works.
Ran swift test and all the test cases have been passed.

@ianpartridge
Copy link
Copy Markdown
Collaborator

ianpartridge commented Feb 21, 2018

Thanks for the PR! Can you split it into two separate PRs? The JSONEncoder changes are logically separate from the access control changes, I think?

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 21, 2018

Codecov Report

Merging #1221 into master will decrease coverage by 0.07%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1221      +/-   ##
==========================================
- Coverage   86.94%   86.87%   -0.08%     
==========================================
  Files          38       38              
  Lines        2367     2369       +2     
==========================================
  Hits         2058     2058              
- Misses        309      311       +2
Flag Coverage Δ
#Kitura 86.87% <81.81%> (-0.08%) ⬇️
Impacted Files Coverage Δ
Sources/Kitura/CodableRouter.swift 65.98% <100%> (ø) ⬆️
Sources/Kitura/Router.swift 83.13% <33.33%> (-0.98%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4fbe57d...ebbc981. Read the comment docs.

@tib tib changed the title Custom JSONEncoder and open access level for Router Custom JSONEncoder for Router Feb 21, 2018
@tib
Copy link
Copy Markdown
Author

tib commented Feb 21, 2018

@ianpartridge sure, I just reverted the access level changes, this one is now for the customJSONEncoder block property.

@EnriqueL8
Copy link
Copy Markdown
Contributor

By changing a encoding strategy, we have to make sure we also change the decoding strategy. Meaning that the JSONEncoder and JSONDecoder should match.
For the test case example of a custom date strategy it had been done here
But if we think of Kitura-Kit, we have to make sure the JSONDecoder for example here matches our JSONEncoder in Kitura

@tib
Copy link
Copy Markdown
Author

tib commented Feb 21, 2018

@EnriqueL8 you are right, I just made a new PR for KituraKit as well.

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.

4 participants