1# <small>nlohmann::json_sax::</small>parse_error 2 3```cpp 4virtual bool parse_error(std::size_t position, 5 const std::string& last_token, 6 const detail::exception& ex) = 0; 7``` 8 9A parse error occurred. 10 11## Parameters 12 13`position` (in) 14: the position in the input where the error occurs 15 16`last_token` (in) 17: the last read token 18 19`ex` (in) 20: an exception object describing the error 21 22## Return value 23 24Whether parsing should proceed (**must return `#!cpp false`**). 25 26## Examples 27 28??? example 29 30 The example below shows how the SAX interface is used. 31 32 ```cpp 33 --8<-- "examples/sax_parse.cpp" 34 ``` 35 36 Output: 37 38 ```json 39 --8<-- "examples/sax_parse.output" 40 ``` 41 42## Version history 43 44- Added in version 3.2.0. 45