Merge pull request #8033 from FedericoCeratto/patch-9
Add hint on JSON serialization
This commit is contained in:
commit
80a1da951d
1 changed files with 2 additions and 0 deletions
|
|
@ -270,6 +270,8 @@ proc store*[T](s: Stream, data: T) =
|
|||
|
||||
proc `$$`*[T](x: T): string =
|
||||
## returns a string representation of `x`.
|
||||
##
|
||||
## Note: to serialize `x` to JSON use $(%x) from the ``json`` module
|
||||
var stored = initIntSet()
|
||||
var d: T
|
||||
shallowCopy(d, x)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue