From ad6eadeb70b6ba20cec985dea8da829fda2fbdd9 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 30 Jun 2020 13:59:43 +0200 Subject: [PATCH] :memo: refine documentation of error_handler parameter --- include/nlohmann/json.hpp | 3 ++- single_include/nlohmann/json.hpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index ace649b6..998aa720 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -2238,7 +2238,8 @@ class basic_json @param[in] error_handler how to react on decoding errors; there are three possible values: `strict` (throws and exception in case a decoding error occurs; default), `replace` (replace invalid UTF-8 sequences with U+FFFD), - and `ignore` (ignore invalid UTF-8 sequences during serialization). + and `ignore` (ignore invalid UTF-8 sequences during serialization; all + bytes are copied to the output unchanged). @return string containing the serialization of the JSON value diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 7ab24c84..426ee815 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -18168,7 +18168,8 @@ class basic_json @param[in] error_handler how to react on decoding errors; there are three possible values: `strict` (throws and exception in case a decoding error occurs; default), `replace` (replace invalid UTF-8 sequences with U+FFFD), - and `ignore` (ignore invalid UTF-8 sequences during serialization). + and `ignore` (ignore invalid UTF-8 sequences during serialization; all + bytes are copied to the output unchanged). @return string containing the serialization of the JSON value