mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +03:00
24 lines
438 B
Plaintext
24 lines
438 B
Plaintext
:: json-rpc: protocol types
|
|
::
|
|
|%
|
|
+$ request
|
|
$: id=@t
|
|
jsonrpc=@t
|
|
method=@t
|
|
params=request-params
|
|
==
|
|
::
|
|
+$ request-params
|
|
$% [%list (list json)]
|
|
[%map (map @t json)]
|
|
[%object (list (pair @t json))]
|
|
==
|
|
+$ response
|
|
$~ [%fail *httr:eyre]
|
|
$% [%result id=@t res=json]
|
|
[%error id=@t code=@t message=@t] ::TODO data?
|
|
[%fail hit=httr:eyre]
|
|
[%batch bas=(list response)]
|
|
==
|
|
--
|