Added option to input custom decoder#3
Added option to input custom decoder#3swmorrow wants to merge 2 commits intoscalpel-software:masterfrom
Conversation
|
@swmorrow Thanks for the PR, this is just acknowledging that I have received it. I will take some time later tomorrow to review it and let you know what I think. |
|
Ok so here are my thoughts. If we are going to add this feature, I think we should prefer to have multiple This api seems more natural to me. Then each of your custom decoders should implement a behavior (e.g. LMKWYT. |
The library as it is allows for custom encoding using tags, which makes it good for places where data is passed between projects of an internal project. However, there is no provided mechanism to decode tags, meaning users have to write their own functions. These functions must be recursive if iteration is required (for example, if one decides to add a custom tag for tuples).
These changes allow for a keyword argument to be passed in containing a decoder function, facilitating decoding custom tags. Examples can be found in updated documentation. Furthermore, this keyword option framework allows for further implementation of different keywords corresponding to custom input decoders in the future.