docs: fix RPC output examples for GET queries (#7799)

Remove JSON-RPC wrappers from GET output, since they are no longer printed.
Also format examples with jq so they look a little neater.

Fixes #7779.

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
This commit is contained in:
M. J. Fromberger
2022-02-10 15:49:32 -08:00
committed by GitHub
co-authored by William Banfield
parent 7885839b75
commit ef1cc5b516
5 changed files with 86 additions and 95 deletions
+26 -26
View File
@@ -22,12 +22,12 @@ method via Websocket along with a valid query.
```json
{
"jsonrpc": "2.0",
"method": "subscribe",
"id": 0,
"params": {
"query": "tm.event='NewBlock'"
}
"jsonrpc": "2.0",
"method": "subscribe",
"id": 0,
"params": {
"query": "tm.event='NewBlock'"
}
}
```
@@ -50,26 +50,26 @@ Response:
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"query": "tm.event='ValidatorSetUpdates'",
"data": {
"type": "tendermint/event/ValidatorSetUpdates",
"value": {
"validator_updates": [
{
"address": "09EAD022FD25DE3A02E64B0FE9610B1417183EE4",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "ww0z4WaZ0Xg+YI10w43wTWbBmM3dpVza4mmSQYsd0ck="
},
"voting_power": "10",
"proposer_priority": "0"
}
]
}
}
"jsonrpc": "2.0",
"id": 0,
"result": {
"query": "tm.event='ValidatorSetUpdates'",
"data": {
"type": "tendermint/event/ValidatorSetUpdates",
"value": {
"validator_updates": [
{
"address": "09EAD022FD25DE3A02E64B0FE9610B1417183EE4",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "ww0z4WaZ0Xg+YI10w43wTWbBmM3dpVza4mmSQYsd0ck="
},
"voting_power": "10",
"proposer_priority": "0"
}
]
}
}
}
}
```