This repository has been archived by the owner on May 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 344
update JSON-RPC codec to observe specification #465
Merged
silasdavis
merged 3 commits into
hyperledger-archives:develop
from
benjaminbollen:issue464_json_spec
Jan 31, 2017
Merged
update JSON-RPC codec to observe specification #465
silasdavis
merged 3 commits into
hyperledger-archives:develop
from
benjaminbollen:issue464_json_spec
Jan 31, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for
and for an error:
|
silasdavis
approved these changes
Jan 31, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to merge, unless we want to switch to marker interface. Just has the advantage of adding intentionality to the struct definer rather than the caller who is passing that struct.
rpc/jsonrpc.go
Outdated
RPCResponse struct { | ||
// RPCResponse MUST follow the JSON-RPC specification for Response object | ||
// reference: http://www.jsonrpc.org/specification#response_object | ||
RPCResponse interface{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about making this an interface with a marker method func AssertIsRPCResponse()
?
…ntation of interface to actual RPCResponse types
Merged
silasdavis
added a commit
to silasdavis/burrow
that referenced
this pull request
Mar 9, 2019
…464_json_spec update JSON-RPC codec to observe specification
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
rpc: update JSON-RPC codec to follow the specification wrt Response object;
specifically the
result
anderror
member of the Response object are mutually exclusive per http://www.jsonrpc.org/specification#response_objectfixes #464