OpenSystemsLab/jsmn.nim

Usage example doesn't compile

Closed this issue · 0 comments

Error: type mismatch: got <string, array[0..31, JsmnToken]>
but expected one of:
proc parseJson(json: string; initialSize = JSMN_TOKENS; autoResize = false): seq[
JsmnToken]
first type mismatch at position: 2
required type for initialSize: int
but expression 'tokens' is of type: array[0..31, JsmnToken]
proc parseJson(json: string; tokens: var seq[JsmnToken]; autoResize = false): int
first type mismatch at position: 2
required type for tokens: var seq[JsmnToken]
but expression 'tokens' is of type: array[0..31, JsmnToken]

expression: parseJson(json, tokens)