• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# basic_json::error_handler_t
2
3```cpp
4enum class error_handler_t {
5    strict,
6    replace,
7    ignore
8};
9```
10
11This enumeration is used in the [`dump`](dump.md) function to choose how to treat decoding errors while serializing a
12`basic_json` value. Three values are differentiated:
13
14strict
15:   throw a `type_error` exception in case of invalid UTF-8
16
17replace
18:   replace invalid UTF-8 sequences with U+FFFD (� REPLACEMENT CHARACTER)
19
20ignore
21:   ignore invalid UTF-8 sequences; all bytes are copied to the output unchanged
22
23## Version history
24
25- Added in version 3.4.0.
26