Open pdimov opened 1 year ago
The JSON-RPC specification uses { "result": t }
for the value case, instead of "value"
; it also uses { "code": 5 }
for the error code, instead of "value"
.
The category in the std::error_code
case should probably also be just "system"
or "generic"
, so as to match the eventual value_from
for std::error_code
provided by Boost.JSON.
result<T, E>
:{ "value": t }
or{ "error": e }
;error_code
:{ "category": "system", "value": 5, "message": "Access is denied" }
;error_condition
: same;error_code
wrappingstd::error_code
:"category": "std:system"
;value_to
, when the category name is unrecognized (not one of "system", "generic", "std:system", "std:generic", "std:iostream"?, "std:future"?): deserialize tounknown_category
, same value;