mirror of
https://github.com/status-im/nim-json-rpc.git
synced 2025-02-23 01:38:16 +00:00
* Use nim-json-serialization for RPCs * Add distinct serializers for RPC types * Avoid ConvFromXtoItselfNotNeeded in testing * Remove redundent `==` template * Rename Eth1JsonRpc to JsonRpc * Fix generic instantiation clash --------- Co-authored-by: jangko <jangko128@gmail.com>
12 lines
272 B
Nim
12 lines
272 B
Nim
import
|
|
../json_rpc/router
|
|
|
|
converter toStr*(value: distinct (string|StringOfJson)): string = string(value)
|
|
|
|
template `==`*(a: StringOfJson, b: JsonNode): bool =
|
|
parseJson(string a) == b
|
|
|
|
template `==`*(a: JsonNode, b: StringOfJson): bool =
|
|
a == parseJson(string b)
|
|
|