fix json.[]

This commit is contained in:
Billingsly Wetherfordshire 2014-06-17 15:05:50 -07:00
commit 13608c0a1a

View file

@ -679,8 +679,8 @@ proc `[]`*(node: PJsonNode, name: string): PJsonNode =
proc `[]`*(node: PJsonNode, index: int): PJsonNode =
## Gets the node at `index` in an Array. Result is undefined if `index`
## is out of bounds
assert(not isNil(node))
assert(node.kind == JArray)
assert(node != nil)
return node.elems[index]
proc hasKey*(node: PJsonNode, key: string): bool =