Switch to json_serialition.JsonString to facilitate Chronicles logging

This commit is contained in:
Zahary Karadjov 2020-03-18 18:14:29 +02:00
parent f53e0b960b
commit 6fbaeb61ca
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609

View File

@ -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.}