summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorDaniil Yarancev <21169548+Yardanico@users.noreply.github.com>2017-10-15 21:08:36 +0300
committerAndreas Rumpf <rumpf_a@web.de>2017-10-15 20:08:36 +0200
commit5cd6316ac6fc67ef316b1db7a1fe5179d1f5e900 (patch)
treed815faac734e64ea02bd9c0231c092ff2a1b16ba /lib
parent4789aa979dd43a83ffcb9eeefdc0420a0dbd7589 (diff)
downloadNim-5cd6316ac6fc67ef316b1db7a1fe5179d1f5e900.tar.gz
Update json.nim (#6513)
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/json.nim12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index a4e9cc225..fd7a3af03 100644
--- a/lib/pure/json.nim
+++ b/lib/pure/json.nim
@@ -695,7 +695,9 @@ proc getBiggestInt*(n: JsonNode, default: BiggestInt = 0): BiggestInt =
   if n.isNil or n.kind != JInt: return default
   else: return n.num
 
-{.deprecated: [getNum: getBiggestInt].}
+proc getNum*(n: JsonNode, default: BiggestInt = 0): BiggestInt {.deprecated.} =
+  ## Deprecated - use getInt or getBiggestInt instead
+  getBiggestInt(n, default)
 
 proc getFloat*(n: JsonNode, default: float = 0.0): float =
   ## Retrieves the float value of a `JFloat JsonNode`.
@@ -707,7 +709,9 @@ proc getFloat*(n: JsonNode, default: float = 0.0): float =
   of JInt: return float(n.num)
   else: return default
 
-{.deprecated: [getFNum: getFloat].}
+proc getFNum*(n: JsonNode, default: float = 0.0): float {.deprecated.} =
+  ## Deprecated - use getFloat instead
+  getFloat(n, default)
 
 proc getBool*(n: JsonNode, default: bool = false): bool =
   ## Retrieves the bool value of a `JBool JsonNode`.
@@ -716,7 +720,9 @@ proc getBool*(n: JsonNode, default: bool = false): bool =
   if n.isNil or n.kind != JBool: return default
   else: return n.bval
 
-{.deprecated: [getBVal: getBool].}
+proc getBVal*(n: JsonNode, default: bool = false): bool {.deprecated.} =
+  ## Deprecated - use getBVal instead
+  getBool(n, default)
 
 proc getFields*(n: JsonNode,
     default = initOrderedTable[string, JsonNode](4)):