summary refs log tree commit diff stats
diff options
context:
space:
mode:
authordef <dennis@felsin9.de>2016-03-04 21:45:14 +0100
committerdef <dennis@felsin9.de>2016-03-04 21:45:14 +0100
commit95f4f70f2da423a25ed573ee90b85d6b1e065b67 (patch)
tree0e50948ad82b1f7eaf222286c8fdf13bacd18b4f
parent0179d842dc90bff400dcabbb28cfe46ebdf1ed98 (diff)
downloadNim-95f4f70f2da423a25ed573ee90b85d6b1e065b67.tar.gz
Use nil instead of null in json
-rw-r--r--lib/pure/json.nim5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index 0d000e05f..30004da84 100644
--- a/lib/pure/json.nim
+++ b/lib/pure/json.nim
@@ -628,9 +628,6 @@ proc newJArray*(): JsonNode =
   result.kind = JArray
   result.elems = @[]
 
-const
-  null*: string = nil ## alias for ``nil``
-
 proc getStr*(n: JsonNode, default: string = ""): string =
   ## Retrieves the string value of a `JString JsonNode`.
   ##
@@ -1315,5 +1312,5 @@ when isMainModule:
     ]
   doAssert j3 == %[%{"name": %"John", "age": %30}, %{"name": %"Susan", "age": %31}]
 
-  var j4 = %*{"test": null}
+  var j4 = %*{"test": nil}
   doAssert j4 == %{"test": newJNull()}