diff --git a/json_rpc/router.nim b/json_rpc/router.nim index fcb13b8..2aa5f08 100644 --- a/json_rpc/router.nim +++ b/json_rpc/router.nim @@ -1,14 +1,17 @@ import - json, tables, chronos, jsonmarshal, strutils, macros, - chronicles, options -export chronos, json, jsonmarshal + json, tables, strutils, macros, options, + chronicles, chronos, json_serialization/writer, + jsonmarshal + +export + chronos, json, jsonmarshal type RpcJsonError* = enum rjeInvalidJson, rjeVersionError, rjeNoMethod, rjeNoId, rjeNoParams, rjeNoJObject RpcJsonErrorContainer* = tuple[err: RpcJsonError, msg: string] - StringOfJson* = distinct string + StringOfJson* = JsonString # Procedure signature accepted as an RPC call by server RpcProc* = proc(input: JsonNode): Future[StringOfJson] {.gcsafe.}