-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Support Indexed Arrays #71
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Refactor implementation to more closely follow the intended usage and therefore support, among other things, decoding top level optionals. Removes `fatalError`s in favor of (presumably) intended implementations. - add support for passing in `userInfo` - add test for decoding optional
siemensikkema
force-pushed
the
feature/support-indexed-arrays
branch
from
September 3, 2021 08:40
95056cb
to
505c393
Compare
siemensikkema
force-pushed
the
feature/support-indexed-arrays
branch
from
September 3, 2021 09:20
505c393
to
6be565c
Compare
siemensikkema
force-pushed
the
feature/support-indexed-arrays
branch
from
September 6, 2021 13:09
6be565c
to
dbd9c55
Compare
0xTim
approved these changes
Sep 8, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
These changes are now available in 4.4.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Supports indexed array elements when decoding and encoding form data (fixes #67, replaces #69).
Indicating that a value belongs to an array can now be done by appending
[0]
,[1]
, etc. to the name, as an alternative to the already supported[]
. This allows for representing nested data inside elements in an array.For instance,
let matrix: [[Int]] = [[42,21]]
can now be represented using part namesmatrix[0][0]
andmatrix[0][1]
. Without indexed array elements there is no way to distinguish the above from[[42],[21]]
.Credits go to @chocoford for identifying the issue, the test cases and the initial PR!