Skip to content

Add support for multiple key containers - #130

Open
bmitchelmore wants to merge 1 commit into
valpackett:masterfrom
bmitchelmore:variant-encoding
Open

Add support for multiple key containers#130
bmitchelmore wants to merge 1 commit into
valpackett:masterfrom
bmitchelmore:variant-encoding

Conversation

@bmitchelmore

Copy link
Copy Markdown

This is a pattern used when multiple objects are being used to encode and decode values, as in the testEncodeVariant test this commit adds. This sort of behaviour already works for JSONEncoder so I thought it would be good to bring support for it here.

I've found it useful in somewhat niche cases with json when dealing with multiple potential data types coming from a single payload, and I've also found an instance where I'd like to use it in cbor as well, so I'm trying to get it added to this library.

This is a pattern used when multiple objects are being
used to encode and decode values, as in the testEncodeVariant
test this commit adds.
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.

1 participant