mirror of
https://github.com/logos-storage/nim-json-rpc.git
synced 2026-01-08 08:33:14 +00:00
Nim HEAD support
This commit is contained in:
parent
2d3db88137
commit
92a7b78f4a
@ -15,11 +15,12 @@ proc `%`*(n: ref SomeInteger): JsonNode =
|
||||
else:
|
||||
result = newJInt(n[])
|
||||
|
||||
proc `%`*[T](option: Option[T]): JsonNode =
|
||||
if option.isSome:
|
||||
result = `%`(option.get)
|
||||
else:
|
||||
result = newJNull()
|
||||
when (NimMajor, NimMinor, NimPatch) < (0, 19, 9):
|
||||
proc `%`*[T](option: Option[T]): JsonNode =
|
||||
if option.isSome:
|
||||
result = `%`(option.get)
|
||||
else:
|
||||
result = newJNull()
|
||||
|
||||
# Compiler requires forward decl when processing out of module
|
||||
proc fromJson(n: JsonNode, argName: string, result: var bool)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user