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

ExpressibleByDictionaryLiteral for JSONBodyParameters #275

Conversation

417-72KI
Copy link
Contributor

There are redundant codes for initializing JSONBodyParameters.
I make it possible to initialize simply from Dictionary Literal.

Before

let object = ["foo": 1, "bar": 2, "baz": 3]
let parameters = JSONBodyParameters(JSONObject: object)

After

let parameters: JSONBodyParameters = ["foo": 1, "bar": 2, "baz": 3]

or

let parameters = ["foo": 1, "bar": 2, "baz": 3] as JSONBodyParameters

Copy link
Collaborator

@Econa77 Econa77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@Econa77 Econa77 merged commit 06f45d7 into ishkawa:master Feb 24, 2021
@417-72KI 417-72KI deleted the feature/dictionary-literal-for-json-body-parameters branch March 17, 2021 08:48
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.

2 participants