remove deprecated procs (#12535)
This commit is contained in:
parent
ffa9a7405f
commit
3ba3307d61
39 changed files with 111 additions and 567 deletions
|
|
@ -234,10 +234,6 @@ proc getBiggestInt*(n: JsonNode, default: BiggestInt = 0): BiggestInt =
|
|||
if n.isNil or n.kind != JInt: return default
|
||||
else: return n.num
|
||||
|
||||
proc getNum*(n: JsonNode, default: BiggestInt = 0): BiggestInt {.deprecated:
|
||||
"Deprecated since v0.18.2; 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`.
|
||||
##
|
||||
|
|
@ -248,10 +244,6 @@ proc getFloat*(n: JsonNode, default: float = 0.0): float =
|
|||
of JInt: return float(n.num)
|
||||
else: return default
|
||||
|
||||
proc getFNum*(n: JsonNode, default: float = 0.0): float {.deprecated:
|
||||
"Deprecated since v0.18.2; use 'getFloat' instead".} =
|
||||
getFloat(n, default)
|
||||
|
||||
proc getBool*(n: JsonNode, default: bool = false): bool =
|
||||
## Retrieves the bool value of a `JBool JsonNode`.
|
||||
##
|
||||
|
|
@ -259,10 +251,6 @@ proc getBool*(n: JsonNode, default: bool = false): bool =
|
|||
if n.isNil or n.kind != JBool: return default
|
||||
else: return n.bval
|
||||
|
||||
proc getBVal*(n: JsonNode, default: bool = false): bool {.deprecated:
|
||||
"Deprecated since v0.18.2; use 'getBool' instead".} =
|
||||
getBool(n, default)
|
||||
|
||||
proc getFields*(n: JsonNode,
|
||||
default = initOrderedTable[string, JsonNode](4)):
|
||||
OrderedTable[string, JsonNode] =
|
||||
|
|
@ -502,10 +490,6 @@ proc contains*(node: JsonNode, val: JsonNode): bool =
|
|||
assert(node.kind == JArray)
|
||||
find(node.elems, val) >= 0
|
||||
|
||||
proc existsKey*(node: JsonNode, key: string): bool {.
|
||||
deprecated: "use 'hasKey' instead".} =
|
||||
node.hasKey(key)
|
||||
|
||||
proc `{}`*(node: JsonNode, keys: varargs[string]): JsonNode =
|
||||
## Traverses the node and gets the given value. If any of the
|
||||
## keys do not exist, returns ``nil``. Also returns ``nil`` if one of the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue