fix #2367
This commit is contained in:
parent
6b8bd2bbb7
commit
8f9ce5285f
1 changed files with 1 additions and 1 deletions
|
|
@ -1074,9 +1074,9 @@ when not defined(js):
|
||||||
## for nice error messages.
|
## for nice error messages.
|
||||||
var p: JsonParser
|
var p: JsonParser
|
||||||
p.open(s, filename)
|
p.open(s, filename)
|
||||||
|
defer: p.close()
|
||||||
discard getTok(p) # read first token
|
discard getTok(p) # read first token
|
||||||
result = p.parseJson()
|
result = p.parseJson()
|
||||||
p.close()
|
|
||||||
|
|
||||||
proc parseJson*(buffer: string): JsonNode =
|
proc parseJson*(buffer: string): JsonNode =
|
||||||
## Parses JSON from `buffer`.
|
## Parses JSON from `buffer`.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue