mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-06 20:04:18 +00:00
Add [un]marshalling examples
This commit is contained in:
@@ -29,6 +29,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
|
||||
|
||||
Reference in New Issue
Block a user