diff options
author | Araq <rumpf_a@web.de> | 2016-11-28 20:59:30 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2016-11-28 20:59:30 +0100 |
commit | 27723af469a937835b9679c41364d9db0090036e (patch) | |
tree | ecdd90e6287d4c172e63cae3f6b25169f4b88708 /lib/pure/marshal.nim | |
parent | ebaf57ea3bc17d1476e9d4bbd8d107eb6dd631a2 (diff) | |
parent | f9c184a4932eb839a6ec4b9293e37583cd33a89a (diff) | |
download | Nim-27723af469a937835b9679c41364d9db0090036e.tar.gz |
Merge branch 'devel' into sighashes
Diffstat (limited to 'lib/pure/marshal.nim')
-rw-r--r-- | lib/pure/marshal.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/pure/marshal.nim b/lib/pure/marshal.nim index 36e6cf52f..c4c731acf 100644 --- a/lib/pure/marshal.nim +++ b/lib/pure/marshal.nim @@ -9,6 +9,7 @@ ## This module contains procs for `serialization`:idx: and `deseralization`:idx: ## of arbitrary Nim data structures. The serialization format uses `JSON`:idx:. +## Warning: The serialization format could change in future! ## ## **Restriction**: For objects their type is **not** serialized. This means ## essentially that it does not work if the object has some other runtime @@ -29,6 +30,12 @@ ## a = b ## echo($$a[]) # produces "{}", not "{f: 0}" ## +## # unmarshal +## let c = to[B]("""{"f": 2}""") +## +## # marshal +## let s = $$c + ## **Note**: The ``to`` and ``$$`` operations are available at compile-time! import streams, typeinfo, json, intsets, tables, unicode |