diff options
author | Federico Ceratto <federico.ceratto@gmail.com> | 2016-05-05 22:02:48 +0100 |
---|---|---|
committer | Federico Ceratto <federico.ceratto@gmail.com> | 2016-05-05 22:02:48 +0100 |
commit | 36be28aa47b6387f6daac6bbe6589eb8cd1ae019 (patch) | |
tree | 962b99e63683f57d810b77b5278ae40872484943 | |
parent | c876b304ba72e93dac4737dd98f003f9ee94d9b8 (diff) | |
download | Nim-36be28aa47b6387f6daac6bbe6589eb8cd1ae019.tar.gz |
Add another JSON example
JSON generation can be a bit tricky, another example might help
-rw-r--r-- | lib/pure/json.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim index b9da8a0dd..5a819b7d8 100644 --- a/lib/pure/json.nim +++ b/lib/pure/json.nim @@ -49,6 +49,10 @@ ## "age": herAge ## } ## ] +## +## var j2 = %* {"name": "Isaac", "books": ["Robot Dreams"]} +## j2["details"] = %* {"age":35, "pi":3.1415} +## echo j2 import hashes, tables, strutils, lexbase, streams, unicode, macros |