Skip to content

Added optional params support.#1

Merged
Astn merged 3 commits intoAstn:masterfrom
bonesoul:master
Mar 7, 2014
Merged

Added optional params support.#1
Astn merged 3 commits intoAstn:masterfrom
bonesoul:master

Conversation

@bonesoul
Copy link
Collaborator

@bonesoul bonesoul commented Mar 6, 2014

The library will itself now track the optional parameters and if rpc-call doesn't supply a value for an optional value for the parameter, it'll be automatically setting a default value for it.

The library will itself now track the optional parameters and if rpc-call doesn't supply a value for an optional value for the parameter, it'll be automatically setting a default value for it.
@bonesoul
Copy link
Collaborator Author

bonesoul commented Mar 6, 2014

For the sake of consistency, here is the reference & use-case discussion on it; https://jsonrpc2.codeplex.com/discussions/537268

bonesoul added 2 commits March 6, 2014 14:42
…ount by one each time we add default-value for an optional parameter that rpc-call didn't set a value for.
@Astn
Copy link
Owner

Astn commented Mar 7, 2014

Looks great! I will be pulling this in tonight, should be able to add a few tests and publish a new release build in the next few days.

Thanks again for the good work.

Astn added a commit that referenced this pull request Mar 7, 2014
Added optional params support. -RastlinTheWiz
@Astn Astn merged commit fd0222b into Astn:master Mar 7, 2014
@bonesoul
Copy link
Collaborator Author

bonesoul commented Mar 7, 2014

Though i only implemented it for arrays as for objects it's already all good (at least should be). ü

And yep we need proper tests I may have fixed some cases where the changes my cause problems.

Astn pushed a commit that referenced this pull request May 23, 2014
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