diff --git a/api/basic_json/cbor_tag_handler_t.md b/api/basic_json/cbor_tag_handler_t.md index dfeb5d693..55a7954d5 100644 --- a/api/basic_json/cbor_tag_handler_t.md +++ b/api/basic_json/cbor_tag_handler_t.md @@ -9,10 +9,10 @@ enum class cbor_tag_handler_t }; ``` -This enumeration is used in the [`from_cbor`](from_cbor.md) function to choose how to treat tags: +This enumeration is used in [`from_cbor`](from_cbor.md) and [`sax_parse`](sax_parse.md) to choose how to treat tags: error -: throw a `parse_error` exception in case of a tag +: report a parse error in case of a tag (the `from_cbor` overloads throw a `parse_error` exception by default) ignore : ignore tags diff --git a/api/basic_json/cbor_tag_handler_t/index.html b/api/basic_json/cbor_tag_handler_t/index.html index 7c4c59b49..e835f8e5b 100644 --- a/api/basic_json/cbor_tag_handler_t/index.html +++ b/api/basic_json/cbor_tag_handler_t/index.html @@ -4,7 +4,7 @@ ignore, store }; -
This enumeration is used in the from_cbor function to choose how to treat tags:
parse_error exception in case of a tagThe example below shows how the different values of the cbor_tag_handler_t influence the behavior of from_cbor when reading a tagged byte string.
#include <iostream>
+This enumeration is used in from_cbor and sax_parse to choose how to treat tags:
from_cbor overloads throw a parse_error exception by default)The example below shows how the different values of the cbor_tag_handler_t influence the behavior of from_cbor when reading a tagged byte string.
#include <iostream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
@@ -35,4 +35,4 @@
Output:
[json.exception.parse_error.112] parse error at byte 1: syntax error while parsing CBOR value: invalid byte: 0xD8
{"bytes":[202,254,186,190],"subtype":null}
{"bytes":[202,254,186,190],"subtype":66}
-store in 3.10.0.