Diagnostics
To enable diagnostics, declare var diagnostics = Diagnostics{}; then call source.enableDiagnostics(&diagnostics);
where source is either a std.json.Reader or a std.json.Scanner that has just been initialized.
At any time, notably just after an error, call getLine(), getColumn(), and/or getByteOffset()
to get meaningful information from this.
Fields of this type
Fields
- line_number:u64
- = 1
- line_start_cursor:usize
- = @as(usize, @bitCast(@as(isize, -1)))
- total_bytes_before_current_input:u64
- = 0
- cursor_pointer:*const usize
- = undefined
Starts at 1.
Functions
- getLine
- Starts at 1.
- getColumn
- Starts at 1.
- getByteOffset
- Starts at 0.