-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add nested decoding #12
base: master
Are you sure you want to change the base?
Conversation
How about |
@bofeizhu do you mean array of enums? Because that’s also implemented in this pull request 🙂 I would leave both in since the library already implements string and enum in it’s API |
Hi @JohnSundell — Any chance you'll be merging this (or your own implementation of nested keypath decoding) into master sometime soon? That was one of my favorite features of Unbox because it allowed our API to adhere to REST but didn't require creating unnecessary container models. It feels like this one addition would make Codextended feature-complete as a companion to the native |
@dtadic FWIW, I do prefer the dot syntax as it's the canonical way to namespace in most languages, and it just feels more readable. Your example of |
|
@dtadic Is nested Encoding necessary? |
Hi!
This allows decoding values from nested containers like this:
with:
I thought of adding a dot syntax (eg:
decoder.decodeNested("a.b.c")
, but found it unnecessary.I'm not sure if
CodextendedDecodingError
works with Codextended's philosophy...It also may be good to add encoding and update readme.