Skip to content
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 overload for KeyValuePair #94

Open
gusty opened this issue Nov 3, 2020 · 1 comment
Open

Add overload for KeyValuePair #94

gusty opened this issue Nov 3, 2020 · 1 comment

Comments

@gusty
Copy link
Member

gusty commented Nov 3, 2020

I think right now the only possibility to parse/encode pairs is through Dictionaries and Objects.
A KeyValuePair would allow to have full control over property/value in cases where we want something else, ie: a MultiMap, a Map where the key is not a string (though we can work it out in another issue) or simply a tuple that it's not encoded as a linear array of 2 elements.

@wallymathieu
Copy link
Member

It would make sense to allow some types as keys, as long as they have a natural string representation. For example, numbers.

I'm the case when you don't have a natural string representation you could add a reference instance using the scheme found in for instance the Swagger spec:
https://swagger.io/specification/
Search for "$ref". The question then is what kind of reference schemes there are (and how it would make sense to support them)?

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

No branches or pull requests

2 participants