Consts
jsonUnexpectedValueErrorLength {.intdefine.} = 100
- number of characters a raw unexpected value can show in an error message if negative, no maximum if zero, just gives value kind Source Edit
Procs
proc endError(reader: JsonReaderArg; expected: string) {.inline, ...raises: [JsonParseError], tags: [], forbids: [].}
- Source Edit
proc error(reader: JsonReaderArg; msg: string) {.inline, ...raises: [JsonValueError], tags: [], forbids: [].}
- Shortcut to raise an exception. Source Edit
proc expectChar(format: JsonReadFormat; reader: JsonReaderArg; c: char) {. inline, ...raises: [Exception, JsonParseError, JsonValueError], tags: [RootEffect], forbids: [].}
- Will consume space before and then the character c. Will raise a value error if c is not found, and a parse error if the end is reached. Source Edit
proc unexpectedError(reader: JsonReaderArg; format: JsonReadFormat; expected: string) {.inline, ...raises: [Exception, JsonParseError, JsonValueError], tags: [RootEffect], forbids: [].}
- Source Edit
proc valueError(reader: JsonReaderArg; format: JsonReadFormat; expected: string) {. inline, ...raises: [Exception, JsonParseError, JsonValueError], tags: [RootEffect], forbids: [].}
- Source Edit
Iterators
iterator readArray(format: JsonReadFormat; reader: JsonReaderArg): int {. ...raises: [Exception, JsonParseError, JsonValueError], tags: [RootEffect], forbids: [].}
- Source Edit
iterator readArrayItems(format: JsonReadFormat; reader: JsonReaderArg; start = 0): int {. ...raises: [Exception, JsonParseError], tags: [RootEffect], forbids: [].}
- Source Edit
iterator readObject[K](format: JsonReadFormat; reader: JsonReaderArg): K
- Source Edit
iterator readObjectFields[K](format: JsonReadFormat; reader: JsonReaderArg): K
- Source Edit