mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 14:03:23 +00:00
Merge pull request #4837 from FedericoCeratto/patch-16
Add few JSON examples
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
## jobj["test"] = newJFloat(0.7) # create or update
|
||||
## echo($jobj["test"].fnum)
|
||||
## echo($jobj["key2"].bval)
|
||||
## echo jobj{"missing key"}.getFNum(0.1) # read a float value using a default
|
||||
## jobj{"a", "b", "c"} = newJFloat(3.3) # created nested keys
|
||||
##
|
||||
## Results in:
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user