Opt-in helper module for serializing the stdlib Port type
This commit is contained in:
parent
f9e06671ce
commit
a1baedeb1b
|
@ -0,0 +1,9 @@
|
|||
import std/net, ../../json_serialization.nim
|
||||
export json_serialization
|
||||
|
||||
proc writeValue*(writer: var JsonWriter, value: Port) =
|
||||
writeValue(writer, uint16 value)
|
||||
|
||||
proc readValue*(reader: var JsonReader, value: var Port) =
|
||||
value = Port reader.readValue(uint16)
|
||||
|
Loading…
Reference in New Issue