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

remove ParamsSer::NoParams #501

Merged
merged 5 commits into from
Oct 11, 2021

Conversation

niklasad1
Copy link
Member

@niklasad1 niklasad1 commented Oct 4, 2021

ParamsSer::NoParams is serialized to null which doesn't comply with the jsonrpc v2 spec.

This PR removes ParamsSer::NoParams and changes the API to take Option<Params> instead.

A Structured value that holds the parameter values to be used during the invocation of the method. This member MAY be omitted.

In the serialization if params is none it's omitted to comply with the spec

Serialize `ParamsSer::NoParams` to an empty array inorder to comply with the jsonrpc v2 spec.
@niklasad1 niklasad1 changed the title fix(ParamsSer): serialize to empty array remove ParamsSer::NoParams Oct 6, 2021
@niklasad1 niklasad1 mentioned this pull request Oct 11, 2021
17 tasks
Copy link
Contributor

@maciejhirsz maciejhirsz left a comment

Choose a reason for hiding this comment

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

👍

@dvdplm dvdplm merged commit b3e4297 into master Oct 11, 2021
@dvdplm dvdplm deleted the na-params-serialize-no-params-as-empty-array branch October 11, 2021 11:25
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.

3 participants