Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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