From d1e03c20d22916a7f2165e12e1fafa94eaf8c67e Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Wed, 13 Jun 2018 23:11:29 +0100 Subject: Add hint on JSON serialization --- lib/pure/marshal.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pure/marshal.nim b/lib/pure/marshal.nim index b88c9dd85..9b6482c77 100644 --- a/lib/pure/marshal.nim +++ b/lib/pure/marshal.nim @@ -270,6 +270,7 @@ 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) -- cgit 1.4.1-2-gfad0 From 127556ad63a6486954bc8a020cffeb91490dee53 Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Wed, 13 Jun 2018 23:22:07 +0100 Subject: Update marshal.nim --- lib/pure/marshal.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pure/marshal.nim b/lib/pure/marshal.nim index 9b6482c77..b90d2899c 100644 --- a/lib/pure/marshal.nim +++ b/lib/pure/marshal.nim @@ -270,6 +270,7 @@ 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 -- cgit 1.4.1-2-gfad0