Allow to set error handler for decoding errors
Fixes #1198 
{"label": "nlohmann:develop", "ref": "develop", "sha": "9294e25c98f9c09a1874842dbcaae7a91336a57e"}
When dumping a json object that contains an std:string we could be thrown the type_error.316 exception if the string contains invalid UTF8 sequences. While this sounds like a reasonable thing to do, it actually causes more problems than it fixes. In all the cases where user-entered (unsafe) strings end up stored in nlohmann::json objects the developer now has to "do something" before assigning a string value to some nlohmann::json variable. This effectively renders the whole string assignment functionality unsafe and defeats its purpose.

Below is the wrapper code I had to write in order to investigate the random crashes my application went through due to the 316 exception.

```C++
// Declaration:
std::string dump_json(const nlohmann::json &json, const int indent =-1, const char* file = __builtin_FILE(), int line = __builtin_LINE()) const;

// Definition
std::string MANAGER::dump_json(const nlohmann::json &json, const int indent, const char* file, int line) const {
    std::string result;
    try {
        result = json.dump(indent);
    }
    catch (nlohmann::json::type_error& e) {
        bug("%s: %s (%s:%d)", __FUNCTION__, e.what(), file, line);
    }
    return result;
}
```

This led me to the discovery of the code in my application that was sending json formatted log events to the log server. The log event has to store user entered data and I would expect the dump function to deal with invalid UTF8 sequences.

If I have to use my json dump wrapper **everywhere** in my application code then of what use is the original dump function to begin with? What is more, I'd actually have to enhance the wrapper function to iterate over all strings stored in the json object and do _something_ about the possible invalid UTF8 sequences. Not very convenient.

Therefore, I would propose the default behavior of the `dump` function to simply ignore (skip or replace) invalid UTF8 sequences and NOT throw. Or perhaps [add a nothrow parameter](http://www.cplusplus.com/reference/new/nothrow/) to the string assignment `=` operator.

If left like that, I probably won't be the last developer who assumed that the dump method is safe to use. After all, if the lib allows me to assign a value to the json object then how can it be that it lets me assign values that later invalidate the whole json? This is illogical. 

```C++
// nothrow assignment would look like this
nlohmann::json j_nothrow = (std::nothrow) "\xF0\xA4\xAD\xC0"; // Does not throw.
// I am not 100% sure if this can be done, but since the `new` operator can have such
// a parameter I would suppose the assignment operator = could also be customized
// like that.

std::string dumped = j_nothrow.dump(); // Never throws, just works.

nlohmann::json j_throw;
try {
    j_throw = "\xF0\xA4\xAD\xC0"; // Throws immediately.
}
catch (nlohmann::json::type_error& e) {
    // handle the invalid UTF8 string
}
```

One more thing. Why not include the file and line from where the exception originated in the exception description? You can see in my above wrapper function how I am using `__builtin_LINE()` and `__builtin_FILE()` to store the file and line information from where the wrapper call was made. It is super useful when debugging and exception description is all about debugging.
Soften the landing when dumping non-UTF8 strings (type_error.316 exception)
diff --git a/include/nlohmann/detail/output/serializer.hpp b/include/nlohmann/detail/output/serializer.hpp
index bb74a86e65..1d107ce04e 100644
--- a/include/nlohmann/detail/output/serializer.hpp
+++ b/include/nlohmann/detail/output/serializer.hpp
@@ -28,6 +28,14 @@ namespace detail
 // serialization //
 ///////////////////
 
+/// how to treat decoding errors
+enum class error_handler_t
+{
+    strict,  ///< throw a type_error exception in case of invalid UTF-8
+    replace, ///< replace invalid UTF-8 sequences with U+FFFD
+    ignore   ///< ignore invalid UTF-8 sequences
+};
+
 template<typename BasicJsonType>
 class serializer
 {
@@ -42,12 +50,17 @@ class serializer
     /*!
     @param[in] s  output stream to serialize to
     @param[in] ichar  indentation character to use
+    @param[in] error_handler_  how to react on decoding errors
     */
-    serializer(output_adapter_t<char> s, const char ichar)
-        : o(std::move(s)), loc(std::localeconv()),
-          thousands_sep(loc->thousands_sep == nullptr ? '\0' : * (loc->thousands_sep)),
-          decimal_point(loc->decimal_point == nullptr ? '\0' : * (loc->decimal_point)),
-          indent_char(ichar), indent_string(512, indent_char)
+    serializer(output_adapter_t<char> s, const char ichar,
+               error_handler_t error_handler_ = error_handler_t::strict)
+        : o(std::move(s))
+        , loc(std::localeconv())
+        , thousands_sep(loc->thousands_sep == nullptr ? '\0' : * (loc->thousands_sep))
+        , decimal_point(loc->decimal_point == nullptr ? '\0' : * (loc->decimal_point))
+        , indent_char(ichar)
+        , indent_string(512, indent_char)
+        , error_handler(error_handler_)
     {}
 
     // delete because of pointer members
@@ -287,6 +300,10 @@ class serializer
         uint8_t state = UTF8_ACCEPT;
         std::size_t bytes = 0;  // number of bytes written to string_buffer
 
+        // number of bytes written at the point of the last valid byte
+        std::size_t bytes_after_last_accept = 0;
+        std::size_t undumped_chars = 0;
+
         for (std::size_t i = 0; i < s.size(); ++i)
         {
             const auto byte = static_cast<uint8_t>(s[i]);
@@ -384,14 +401,68 @@ class serializer
                         o->write_characters(string_buffer.data(), bytes);
                         bytes = 0;
                     }
+
+                    // remember the byte position of this accept
+                    bytes_after_last_accept = bytes;
+                    undumped_chars = 0;
                     break;
                 }
 
                 case UTF8_REJECT:  // decode found invalid UTF-8 byte
                 {
-                    std::string sn(3, '\0');
-                    snprintf(&sn[0], sn.size(), "%.2X", byte);
-                    JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + sn));
+                    switch (error_handler)
+                    {
+                        case error_handler_t::strict:
+                        {
+                            std::string sn(3, '\0');
+                            snprintf(&sn[0], sn.size(), "%.2X", byte);
+                            JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + sn));
+                        }
+
+                        case error_handler_t::ignore:
+                        case error_handler_t::replace:
+                        {
+                            // in case we saw this character the first time, we
+                            // would like to read it again, because the byte
+                            // may be OK for itself, but just not OK for the
+                            // previous sequence
+                            if (undumped_chars > 0)
+                            {
+                                --i;
+                            }
+
+                            // reset length buffer to the last accepted index;
+                            // thus removing/ignoring the invalid characters
+                            bytes = bytes_after_last_accept;
+
+                            if (error_handler == error_handler_t::replace)
+                            {
+                                // add a replacement character
+                                if (ensure_ascii)
+                                {
+                                    string_buffer[bytes++] = '\\';
+                                    string_buffer[bytes++] = 'u';
+                                    string_buffer[bytes++] = 'f';
+                                    string_buffer[bytes++] = 'f';
+                                    string_buffer[bytes++] = 'f';
+                                    string_buffer[bytes++] = 'd';
+                                }
+                                else
+                                {
+                                    string_buffer[bytes++] = '\xEF';
+                                    string_buffer[bytes++] = '\xBF';
+                                    string_buffer[bytes++] = '\xBD';
+                                }
+                                bytes_after_last_accept = bytes;
+                            }
+
+                            undumped_chars = 0;
+
+                            // continue processing the string
+                            state = UTF8_ACCEPT;
+                            continue;
+                        }
+                    }
                 }
 
                 default:  // decode found yet incomplete multi-byte code point
@@ -401,11 +472,13 @@ class serializer
                         // code point will not be escaped - copy byte to buffer
                         string_buffer[bytes++] = s[i];
                     }
+                    ++undumped_chars;
                     break;
                 }
             }
         }
 
+        // we finished processing the string
         if (JSON_LIKELY(state == UTF8_ACCEPT))
         {
             // write buffer
@@ -417,9 +490,38 @@ class serializer
         else
         {
             // we finish reading, but do not accept: string was incomplete
-            std::string sn(3, '\0');
-            snprintf(&sn[0], sn.size(), "%.2X", static_cast<uint8_t>(s.back()));
-            JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + sn));
+            switch (error_handler)
+            {
+                case error_handler_t::strict:
+                {
+                    std::string sn(3, '\0');
+                    snprintf(&sn[0], sn.size(), "%.2X", static_cast<uint8_t>(s.back()));
+                    JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + sn));
+                }
+
+                case error_handler_t::ignore:
+                {
+                    // write all accepted bytes
+                    o->write_characters(string_buffer.data(), bytes_after_last_accept);
+                    break;
+                }
+
+                case error_handler_t::replace:
+                {
+                    // write all accepted bytes
+                    o->write_characters(string_buffer.data(), bytes_after_last_accept);
+                    // add a replacement character
+                    if (ensure_ascii)
+                    {
+                        o->write_characters("\\ufffd", 6);
+                    }
+                    else
+                    {
+                        o->write_characters("\xEF\xBF\xBD", 3);
+                    }
+                    break;
+                }
+            }
         }
     }
 
@@ -629,6 +731,9 @@ class serializer
     const char indent_char;
     /// the indentation string
     string_t indent_string;
+
+    /// error_handler how to react on decoding errors
+    const error_handler_t error_handler;
 };
 }  // namespace detail
 }  // namespace nlohmann
diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp
index 619fd9e630..a5f7d47d0e 100644
--- a/include/nlohmann/json.hpp
+++ b/include/nlohmann/json.hpp
@@ -208,6 +208,8 @@ class basic_json
     using json_pointer = ::nlohmann::json_pointer<basic_json>;
     template<typename T, typename SFINAE>
     using json_serializer = JSONSerializer<T, SFINAE>;
+    /// how to treat decoding errors
+    using error_handler_t = detail::error_handler_t;
     /// helper type for initializer lists of basic_json values
     using initializer_list_t = std::initializer_list<detail::json_ref<basic_json>>;
 
@@ -1932,6 +1934,10 @@ class basic_json
     @param[in] ensure_ascii If @a ensure_ascii is true, all non-ASCII characters
     in the output are escaped with `\uXXXX` sequences, and the result consists
     of ASCII characters only.
+    @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).
 
     @return string containing the serialization of the JSON value
 
@@ -1950,13 +1956,16 @@ class basic_json
     @see https://docs.python.org/2/library/json.html#json.dump
 
     @since version 1.0.0; indentation character @a indent_char, option
-           @a ensure_ascii and exceptions added in version 3.0.0
+           @a ensure_ascii and exceptions added in version 3.0.0; error
+           handlers added in version 3.4.0.
     */
-    string_t dump(const int indent = -1, const char indent_char = ' ',
-                  const bool ensure_ascii = false) const
+    string_t dump(const int indent = -1,
+                  const char indent_char = ' ',
+                  const bool ensure_ascii = false,
+                  const error_handler_t error_handler = error_handler_t::strict) const
     {
         string_t result;
-        serializer s(detail::output_adapter<char, string_t>(result), indent_char);
+        serializer s(detail::output_adapter<char, string_t>(result), indent_char, error_handler);
 
         if (indent >= 0)
         {
diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp
index dc206d3017..be3f84174a 100644
--- a/single_include/nlohmann/json.hpp
+++ b/single_include/nlohmann/json.hpp
@@ -9980,6 +9980,14 @@ namespace detail
 // serialization //
 ///////////////////
 
+/// how to treat decoding errors
+enum class error_handler_t
+{
+    strict,  ///< throw a type_error exception in case of invalid UTF-8
+    replace, ///< replace invalid UTF-8 sequences with U+FFFD
+    ignore   ///< ignore invalid UTF-8 sequences
+};
+
 template<typename BasicJsonType>
 class serializer
 {
@@ -9994,12 +10002,17 @@ class serializer
     /*!
     @param[in] s  output stream to serialize to
     @param[in] ichar  indentation character to use
-    */
-    serializer(output_adapter_t<char> s, const char ichar)
-        : o(std::move(s)), loc(std::localeconv()),
-          thousands_sep(loc->thousands_sep == nullptr ? '\0' : * (loc->thousands_sep)),
-          decimal_point(loc->decimal_point == nullptr ? '\0' : * (loc->decimal_point)),
-          indent_char(ichar), indent_string(512, indent_char)
+    @param[in] error_handler_  how to react on decoding errors
+    */
+    serializer(output_adapter_t<char> s, const char ichar,
+               error_handler_t error_handler_ = error_handler_t::strict)
+        : o(std::move(s))
+        , loc(std::localeconv())
+        , thousands_sep(loc->thousands_sep == nullptr ? '\0' : * (loc->thousands_sep))
+        , decimal_point(loc->decimal_point == nullptr ? '\0' : * (loc->decimal_point))
+        , indent_char(ichar)
+        , indent_string(512, indent_char)
+        , error_handler(error_handler_)
     {}
 
     // delete because of pointer members
@@ -10239,6 +10252,10 @@ class serializer
         uint8_t state = UTF8_ACCEPT;
         std::size_t bytes = 0;  // number of bytes written to string_buffer
 
+        // number of bytes written at the point of the last valid byte
+        std::size_t bytes_after_last_accept = 0;
+        std::size_t undumped_chars = 0;
+
         for (std::size_t i = 0; i < s.size(); ++i)
         {
             const auto byte = static_cast<uint8_t>(s[i]);
@@ -10336,14 +10353,68 @@ class serializer
                         o->write_characters(string_buffer.data(), bytes);
                         bytes = 0;
                     }
+
+                    // remember the byte position of this accept
+                    bytes_after_last_accept = bytes;
+                    undumped_chars = 0;
                     break;
                 }
 
                 case UTF8_REJECT:  // decode found invalid UTF-8 byte
                 {
-                    std::string sn(3, '\0');
-                    snprintf(&sn[0], sn.size(), "%.2X", byte);
-                    JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + sn));
+                    switch (error_handler)
+                    {
+                        case error_handler_t::strict:
+                        {
+                            std::string sn(3, '\0');
+                            snprintf(&sn[0], sn.size(), "%.2X", byte);
+                            JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + sn));
+                        }
+
+                        case error_handler_t::ignore:
+                        case error_handler_t::replace:
+                        {
+                            // in case we saw this character the first time, we
+                            // would like to read it again, because the byte
+                            // may be OK for itself, but just not OK for the
+                            // previous sequence
+                            if (undumped_chars > 0)
+                            {
+                                --i;
+                            }
+
+                            // reset length buffer to the last accepted index;
+                            // thus removing/ignoring the invalid characters
+                            bytes = bytes_after_last_accept;
+
+                            if (error_handler == error_handler_t::replace)
+                            {
+                                // add a replacement character
+                                if (ensure_ascii)
+                                {
+                                    string_buffer[bytes++] = '\\';
+                                    string_buffer[bytes++] = 'u';
+                                    string_buffer[bytes++] = 'f';
+                                    string_buffer[bytes++] = 'f';
+                                    string_buffer[bytes++] = 'f';
+                                    string_buffer[bytes++] = 'd';
+                                }
+                                else
+                                {
+                                    string_buffer[bytes++] = '\xEF';
+                                    string_buffer[bytes++] = '\xBF';
+                                    string_buffer[bytes++] = '\xBD';
+                                }
+                                bytes_after_last_accept = bytes;
+                            }
+
+                            undumped_chars = 0;
+
+                            // continue processing the string
+                            state = UTF8_ACCEPT;
+                            continue;
+                        }
+                    }
                 }
 
                 default:  // decode found yet incomplete multi-byte code point
@@ -10353,11 +10424,13 @@ class serializer
                         // code point will not be escaped - copy byte to buffer
                         string_buffer[bytes++] = s[i];
                     }
+                    ++undumped_chars;
                     break;
                 }
             }
         }
 
+        // we finished processing the string
         if (JSON_LIKELY(state == UTF8_ACCEPT))
         {
             // write buffer
@@ -10369,9 +10442,38 @@ class serializer
         else
         {
             // we finish reading, but do not accept: string was incomplete
-            std::string sn(3, '\0');
-            snprintf(&sn[0], sn.size(), "%.2X", static_cast<uint8_t>(s.back()));
-            JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + sn));
+            switch (error_handler)
+            {
+                case error_handler_t::strict:
+                {
+                    std::string sn(3, '\0');
+                    snprintf(&sn[0], sn.size(), "%.2X", static_cast<uint8_t>(s.back()));
+                    JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + sn));
+                }
+
+                case error_handler_t::ignore:
+                {
+                    // write all accepted bytes
+                    o->write_characters(string_buffer.data(), bytes_after_last_accept);
+                    break;
+                }
+
+                case error_handler_t::replace:
+                {
+                    // write all accepted bytes
+                    o->write_characters(string_buffer.data(), bytes_after_last_accept);
+                    // add a replacement character
+                    if (ensure_ascii)
+                    {
+                        o->write_characters("\\ufffd", 6);
+                    }
+                    else
+                    {
+                        o->write_characters("\xEF\xBF\xBD", 3);
+                    }
+                    break;
+                }
+            }
         }
     }
 
@@ -10581,6 +10683,9 @@ class serializer
     const char indent_char;
     /// the indentation string
     string_t indent_string;
+
+    /// error_handler how to react on decoding errors
+    const error_handler_t error_handler;
 };
 }  // namespace detail
 }  // namespace nlohmann
@@ -11550,6 +11655,8 @@ class basic_json
     using json_pointer = ::nlohmann::json_pointer<basic_json>;
     template<typename T, typename SFINAE>
     using json_serializer = JSONSerializer<T, SFINAE>;
+    /// how to treat decoding errors
+    using error_handler_t = detail::error_handler_t;
     /// helper type for initializer lists of basic_json values
     using initializer_list_t = std::initializer_list<detail::json_ref<basic_json>>;
 
@@ -13274,6 +13381,10 @@ class basic_json
     @param[in] ensure_ascii If @a ensure_ascii is true, all non-ASCII characters
     in the output are escaped with `\uXXXX` sequences, and the result consists
     of ASCII characters only.
+    @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).
 
     @return string containing the serialization of the JSON value
 
@@ -13292,13 +13403,16 @@ class basic_json
     @see https://docs.python.org/2/library/json.html#json.dump
 
     @since version 1.0.0; indentation character @a indent_char, option
-           @a ensure_ascii and exceptions added in version 3.0.0
+           @a ensure_ascii and exceptions added in version 3.0.0; error
+           handlers added in version 3.4.0.
     */
-    string_t dump(const int indent = -1, const char indent_char = ' ',
-                  const bool ensure_ascii = false) const
+    string_t dump(const int indent = -1,
+                  const char indent_char = ' ',
+                  const bool ensure_ascii = false,
+                  const error_handler_t error_handler = error_handler_t::strict) const
     {
         string_t result;
-        serializer s(detail::output_adapter<char, string_t>(result), indent_char);
+        serializer s(detail::output_adapter<char, string_t>(result), indent_char, error_handler);
 
         if (indent >= 0)
         {

diff --git a/test/src/unit-serialization.cpp b/test/src/unit-serialization.cpp
index 0eed7246ee..1fe796e579 100644
--- a/test/src/unit-serialization.cpp
+++ b/test/src/unit-serialization.cpp
@@ -94,4 +94,80 @@ TEST_CASE("serialization")
                   "[\n\t\"foo\",\n\t1,\n\t2,\n\t3,\n\tfalse,\n\t{\n\t\t\"one\": 1\n\t}\n]");
         }
     }
+
+    SECTION("dump")
+    {
+        SECTION("invalid character")
+        {
+            json j = "ä\xA9ü";
+
+            CHECK_THROWS_AS(j.dump(), json::type_error&);
+            CHECK_THROWS_WITH(j.dump(), "[json.exception.type_error.316] invalid UTF-8 byte at index 2: 0xA9");
+            CHECK_THROWS_AS(j.dump(1, ' ', false, json::error_handler_t::strict), json::type_error&);
+            CHECK_THROWS_WITH(j.dump(1, ' ', false, json::error_handler_t::strict), "[json.exception.type_error.316] invalid UTF-8 byte at index 2: 0xA9");
+            CHECK(j.dump(-1, ' ', false, json::error_handler_t::ignore) == "\"äü\"");
+            CHECK(j.dump(-1, ' ', false, json::error_handler_t::replace) == "\"ä\xEF\xBF\xBDü\"");
+            CHECK(j.dump(-1, ' ', true, json::error_handler_t::replace) == "\"\\u00e4\\ufffd\\u00fc\"");
+        }
+
+        SECTION("ending with incomplete character")
+        {
+            json j = "123\xC2";
+
+            CHECK_THROWS_AS(j.dump(), json::type_error&);
+            CHECK_THROWS_WITH(j.dump(), "[json.exception.type_error.316] incomplete UTF-8 string; last byte: 0xC2");
+            CHECK_THROWS_AS(j.dump(1, ' ', false, json::error_handler_t::strict), json::type_error&);
+            CHECK(j.dump(-1, ' ', false, json::error_handler_t::ignore) == "\"123\"");
+            CHECK(j.dump(-1, ' ', false, json::error_handler_t::replace) == "\"123\xEF\xBF\xBD\"");
+            CHECK(j.dump(-1, ' ', true, json::error_handler_t::replace) == "\"123\\ufffd\"");
+        }
+
+        SECTION("unexpected character")
+        {
+            json j = "123\xF1\xB0\x34\x35\x36";
+
+            CHECK_THROWS_AS(j.dump(), json::type_error&);
+            CHECK_THROWS_WITH(j.dump(), "[json.exception.type_error.316] invalid UTF-8 byte at index 5: 0x34");
+            CHECK_THROWS_AS(j.dump(1, ' ', false, json::error_handler_t::strict), json::type_error&);
+            CHECK(j.dump(-1, ' ', false, json::error_handler_t::ignore) == "\"123456\"");
+            CHECK(j.dump(-1, ' ', false, json::error_handler_t::replace) == "\"123\xEF\xBF\xBD\x34\x35\x36\"");
+            CHECK(j.dump(-1, ' ', true, json::error_handler_t::replace) == "\"123\\ufffd456\"");
+        }
+
+        SECTION("U+FFFD Substitution of Maximal Subparts")
+        {
+            // Some tests (mostly) from
+            // https://www.unicode.org/versions/Unicode11.0.0/ch03.pdf
+            // Section 3.9 -- U+FFFD Substitution of Maximal Subparts
+
+            auto test = [&](std::string const & input, std::string const & expected)
+            {
+                json j = input;
+                CHECK(j.dump(-1, ' ', true, json::error_handler_t::replace) == "\"" + expected + "\"");
+            };
+
+            test("\xC2", "\\ufffd");
+            test("\xC2\x41\x42", "\\ufffd" "\x41" "\x42");
+            test("\xC2\xF4", "\\ufffd" "\\ufffd");
+
+            test("\xF0\x80\x80\x41", "\\ufffd" "\\ufffd" "\\ufffd" "\x41");
+            test("\xF1\x80\x80\x41", "\\ufffd" "\x41");
+            test("\xF2\x80\x80\x41", "\\ufffd" "\x41");
+            test("\xF3\x80\x80\x41", "\\ufffd" "\x41");
+            test("\xF4\x80\x80\x41", "\\ufffd" "\x41");
+            test("\xF5\x80\x80\x41", "\\ufffd" "\\ufffd" "\\ufffd" "\x41");
+
+            test("\xF0\x90\x80\x41", "\\ufffd" "\x41");
+            test("\xF1\x90\x80\x41", "\\ufffd" "\x41");
+            test("\xF2\x90\x80\x41", "\\ufffd" "\x41");
+            test("\xF3\x90\x80\x41", "\\ufffd" "\x41");
+            test("\xF4\x90\x80\x41", "\\ufffd" "\\ufffd" "\\ufffd" "\x41");
+            test("\xF5\x90\x80\x41", "\\ufffd" "\\ufffd" "\\ufffd" "\x41");
+
+            test("\xC0\xAF\xE0\x80\xBF\xF0\x81\x82\x41", "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\x41");
+            test("\xED\xA0\x80\xED\xBF\xBF\xED\xAF\x41", "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\x41");
+            test("\xF4\x91\x92\x93\xFF\x41\x80\xBF\x42", "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\x41" "\\ufffd""\\ufffd" "\x42");
+            test("\xE1\x80\xE2\xF0\x91\x92\xF1\xBF\x41", "\\ufffd" "\\ufffd" "\\ufffd" "\\ufffd" "\x41");
+        }
+    }
 }
diff --git a/test/src/unit-unicode.cpp b/test/src/unit-unicode.cpp
index 4def1a3e8f..a8a0a93885 100644
--- a/test/src/unit-unicode.cpp
+++ b/test/src/unit-unicode.cpp
@@ -39,6 +39,80 @@ using nlohmann::json;
 extern size_t calls;
 size_t calls = 0;
 
+void check_utf8dump(bool success_expected, int byte1, int byte2, int byte3, int byte4);
+
+void check_utf8dump(bool success_expected, int byte1, int byte2 = -1, int byte3 = -1, int byte4 = -1)
+{
+    std::string json_string;
+
+    CAPTURE(byte1);
+    CAPTURE(byte2);
+    CAPTURE(byte3);
+    CAPTURE(byte4);
+
+    json_string += std::string(1, static_cast<char>(byte1));
+
+    if (byte2 != -1)
+    {
+        json_string += std::string(1, static_cast<char>(byte2));
+    }
+
+    if (byte3 != -1)
+    {
+        json_string += std::string(1, static_cast<char>(byte3));
+    }
+
+    if (byte4 != -1)
+    {
+        json_string += std::string(1, static_cast<char>(byte4));
+    }
+
+    CAPTURE(json_string);
+
+    // store the string in a JSON value
+    json j = json_string;
+    json j2 = "abc" + json_string + "xyz";
+
+    // dumping with ignore/replace must not throw in any case
+    auto s_ignored = j.dump(-1, ' ', false, json::error_handler_t::ignore);
+    auto s_ignored2 = j2.dump(-1, ' ', false, json::error_handler_t::ignore);
+    auto s_ignored_ascii = j.dump(-1, ' ', true, json::error_handler_t::ignore);
+    auto s_ignored2_ascii = j2.dump(-1, ' ', true, json::error_handler_t::ignore);
+    auto s_replaced = j.dump(-1, ' ', false, json::error_handler_t::replace);
+    auto s_replaced2 = j2.dump(-1, ' ', false, json::error_handler_t::replace);
+    auto s_replaced_ascii = j.dump(-1, ' ', true, json::error_handler_t::replace);
+    auto s_replaced2_ascii = j2.dump(-1, ' ', true, json::error_handler_t::replace);
+
+    if (success_expected)
+    {
+        // strict mode must not throw if success is expected
+        auto s_strict = j.dump();
+        // all dumps should agree on the string
+        CHECK(s_strict == s_ignored);
+        CHECK(s_strict == s_replaced);
+    }
+    else
+    {
+        // strict mode must throw if success is not expected
+        CHECK_THROWS_AS(j.dump(), json::type_error&);
+        // ignore and replace must create different dumps
+        CHECK(s_ignored != s_replaced);
+
+        // check that replace string contains a replacement character
+        CHECK(s_replaced.find("\xEF\xBF\xBD") != std::string::npos);
+    }
+
+    // check that prefix and suffix are preserved
+    CHECK(s_ignored2.substr(1, 3) == "abc");
+    CHECK(s_ignored2.substr(s_ignored2.size() - 4, 3) == "xyz");
+    CHECK(s_ignored2_ascii.substr(1, 3) == "abc");
+    CHECK(s_ignored2_ascii.substr(s_ignored2_ascii.size() - 4, 3) == "xyz");
+    CHECK(s_replaced2.substr(1, 3) == "abc");
+    CHECK(s_replaced2.substr(s_replaced2.size() - 4, 3) == "xyz");
+    CHECK(s_replaced2_ascii.substr(1, 3) == "abc");
+    CHECK(s_replaced2_ascii.substr(s_replaced2_ascii.size() - 4, 3) == "xyz");
+}
+
 void check_utf8string(bool success_expected, int byte1, int byte2, int byte3, int byte4);
 
 // create and check a JSON string with up to four UTF-8 bytes
@@ -115,11 +189,13 @@ TEST_CASE("Unicode", "[hide]")
             for (int byte1 = 0x80; byte1 <= 0xC1; ++byte1)
             {
                 check_utf8string(false, byte1);
+                check_utf8dump(false, byte1);
             }
 
             for (int byte1 = 0xF5; byte1 <= 0xFF; ++byte1)
             {
                 check_utf8string(false, byte1);
+                check_utf8dump(false, byte1);
             }
         }
 
@@ -152,6 +228,7 @@ TEST_CASE("Unicode", "[hide]")
 
                     // all other characters are OK
                     check_utf8string(true, byte1);
+                    check_utf8dump(true, byte1);
                 }
             }
         }
@@ -165,6 +242,7 @@ TEST_CASE("Unicode", "[hide]")
                     for (int byte2 = 0x80; byte2 <= 0xBF; ++byte2)
                     {
                         check_utf8string(true, byte1, byte2);
+                        check_utf8dump(true, byte1, byte2);
                     }
                 }
             }
@@ -174,6 +252,7 @@ TEST_CASE("Unicode", "[hide]")
                 for (int byte1 = 0xC2; byte1 <= 0xDF; ++byte1)
                 {
                     check_utf8string(false, byte1);
+                    check_utf8dump(false, byte1);
                 }
             }
 
@@ -190,6 +269,7 @@ TEST_CASE("Unicode", "[hide]")
                         }
 
                         check_utf8string(false, byte1, byte2);
+                        check_utf8dump(false, byte1, byte2);
                     }
                 }
             }
@@ -206,6 +286,7 @@ TEST_CASE("Unicode", "[hide]")
                         for (int byte3 = 0x80; byte3 <= 0xBF; ++byte3)
                         {
                             check_utf8string(true, byte1, byte2, byte3);
+                            check_utf8dump(true, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -216,6 +297,7 @@ TEST_CASE("Unicode", "[hide]")
                 for (int byte1 = 0xE0; byte1 <= 0xE0; ++byte1)
                 {
                     check_utf8string(false, byte1);
+                    check_utf8dump(false, byte1);
                 }
             }
 
@@ -226,6 +308,7 @@ TEST_CASE("Unicode", "[hide]")
                     for (int byte2 = 0xA0; byte2 <= 0xBF; ++byte2)
                     {
                         check_utf8string(false, byte1, byte2);
+                        check_utf8dump(false, byte1, byte2);
                     }
                 }
             }
@@ -245,6 +328,7 @@ TEST_CASE("Unicode", "[hide]")
                         for (int byte3 = 0x80; byte3 <= 0xBF; ++byte3)
                         {
                             check_utf8string(false, byte1, byte2, byte3);
+                            check_utf8dump(false, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -265,6 +349,7 @@ TEST_CASE("Unicode", "[hide]")
                             }
 
                             check_utf8string(false, byte1, byte2, byte3);
+                            check_utf8dump(false, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -282,6 +367,7 @@ TEST_CASE("Unicode", "[hide]")
                         for (int byte3 = 0x80; byte3 <= 0xBF; ++byte3)
                         {
                             check_utf8string(true, byte1, byte2, byte3);
+                            check_utf8dump(true, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -292,6 +378,7 @@ TEST_CASE("Unicode", "[hide]")
                 for (int byte1 = 0xE1; byte1 <= 0xEC; ++byte1)
                 {
                     check_utf8string(false, byte1);
+                    check_utf8dump(false, byte1);
                 }
             }
 
@@ -302,6 +389,7 @@ TEST_CASE("Unicode", "[hide]")
                     for (int byte2 = 0x80; byte2 <= 0xBF; ++byte2)
                     {
                         check_utf8string(false, byte1, byte2);
+                        check_utf8dump(false, byte1, byte2);
                     }
                 }
             }
@@ -321,6 +409,7 @@ TEST_CASE("Unicode", "[hide]")
                         for (int byte3 = 0x80; byte3 <= 0xBF; ++byte3)
                         {
                             check_utf8string(false, byte1, byte2, byte3);
+                            check_utf8dump(false, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -341,6 +430,7 @@ TEST_CASE("Unicode", "[hide]")
                             }
 
                             check_utf8string(false, byte1, byte2, byte3);
+                            check_utf8dump(false, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -358,6 +448,7 @@ TEST_CASE("Unicode", "[hide]")
                         for (int byte3 = 0x80; byte3 <= 0xBF; ++byte3)
                         {
                             check_utf8string(true, byte1, byte2, byte3);
+                            check_utf8dump(true, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -368,6 +459,7 @@ TEST_CASE("Unicode", "[hide]")
                 for (int byte1 = 0xED; byte1 <= 0xED; ++byte1)
                 {
                     check_utf8string(false, byte1);
+                    check_utf8dump(false, byte1);
                 }
             }
 
@@ -378,6 +470,7 @@ TEST_CASE("Unicode", "[hide]")
                     for (int byte2 = 0x80; byte2 <= 0x9F; ++byte2)
                     {
                         check_utf8string(false, byte1, byte2);
+                        check_utf8dump(false, byte1, byte2);
                     }
                 }
             }
@@ -397,6 +490,7 @@ TEST_CASE("Unicode", "[hide]")
                         for (int byte3 = 0x80; byte3 <= 0xBF; ++byte3)
                         {
                             check_utf8string(false, byte1, byte2, byte3);
+                            check_utf8dump(false, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -417,6 +511,7 @@ TEST_CASE("Unicode", "[hide]")
                             }
 
                             check_utf8string(false, byte1, byte2, byte3);
+                            check_utf8dump(false, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -434,6 +529,7 @@ TEST_CASE("Unicode", "[hide]")
                         for (int byte3 = 0x80; byte3 <= 0xBF; ++byte3)
                         {
                             check_utf8string(true, byte1, byte2, byte3);
+                            check_utf8dump(true, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -444,6 +540,7 @@ TEST_CASE("Unicode", "[hide]")
                 for (int byte1 = 0xEE; byte1 <= 0xEF; ++byte1)
                 {
                     check_utf8string(false, byte1);
+                    check_utf8dump(false, byte1);
                 }
             }
 
@@ -454,6 +551,7 @@ TEST_CASE("Unicode", "[hide]")
                     for (int byte2 = 0x80; byte2 <= 0xBF; ++byte2)
                     {
                         check_utf8string(false, byte1, byte2);
+                        check_utf8dump(false, byte1, byte2);
                     }
                 }
             }
@@ -473,6 +571,7 @@ TEST_CASE("Unicode", "[hide]")
                         for (int byte3 = 0x80; byte3 <= 0xBF; ++byte3)
                         {
                             check_utf8string(false, byte1, byte2, byte3);
+                            check_utf8dump(false, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -493,6 +592,7 @@ TEST_CASE("Unicode", "[hide]")
                             }
 
                             check_utf8string(false, byte1, byte2, byte3);
+                            check_utf8dump(false, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -512,6 +612,7 @@ TEST_CASE("Unicode", "[hide]")
                             for (int byte4 = 0x80; byte4 <= 0xBF; ++byte4)
                             {
                                 check_utf8string(true, byte1, byte2, byte3, byte4);
+                                check_utf8dump(true, byte1, byte2, byte3, byte4);
                             }
                         }
                     }
@@ -523,6 +624,7 @@ TEST_CASE("Unicode", "[hide]")
                 for (int byte1 = 0xF0; byte1 <= 0xF0; ++byte1)
                 {
                     check_utf8string(false, byte1);
+                    check_utf8dump(false, byte1);
                 }
             }
 
@@ -533,6 +635,7 @@ TEST_CASE("Unicode", "[hide]")
                     for (int byte2 = 0x90; byte2 <= 0xBF; ++byte2)
                     {
                         check_utf8string(false, byte1, byte2);
+                        check_utf8dump(false, byte1, byte2);
                     }
                 }
             }
@@ -546,6 +649,7 @@ TEST_CASE("Unicode", "[hide]")
                         for (int byte3 = 0x80; byte3 <= 0xBF; ++byte3)
                         {
                             check_utf8string(false, byte1, byte2, byte3);
+                            check_utf8dump(false, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -568,6 +672,7 @@ TEST_CASE("Unicode", "[hide]")
                             for (int byte4 = 0x80; byte4 <= 0xBF; ++byte4)
                             {
                                 check_utf8string(false, byte1, byte2, byte3, byte4);
+                                check_utf8dump(false, byte1, byte2, byte3, byte4);
                             }
                         }
                     }
@@ -591,6 +696,7 @@ TEST_CASE("Unicode", "[hide]")
                             for (int byte4 = 0x80; byte4 <= 0xBF; ++byte4)
                             {
                                 check_utf8string(false, byte1, byte2, byte3, byte4);
+                                check_utf8dump(false, byte1, byte2, byte3, byte4);
                             }
                         }
                     }
@@ -614,6 +720,7 @@ TEST_CASE("Unicode", "[hide]")
                                 }
 
                                 check_utf8string(false, byte1, byte2, byte3, byte4);
+                                check_utf8dump(false, byte1, byte2, byte3, byte4);
                             }
                         }
                     }
@@ -634,6 +741,7 @@ TEST_CASE("Unicode", "[hide]")
                             for (int byte4 = 0x80; byte4 <= 0xBF; ++byte4)
                             {
                                 check_utf8string(true, byte1, byte2, byte3, byte4);
+                                check_utf8dump(true, byte1, byte2, byte3, byte4);
                             }
                         }
                     }
@@ -645,6 +753,7 @@ TEST_CASE("Unicode", "[hide]")
                 for (int byte1 = 0xF1; byte1 <= 0xF3; ++byte1)
                 {
                     check_utf8string(false, byte1);
+                    check_utf8dump(false, byte1);
                 }
             }
 
@@ -655,6 +764,7 @@ TEST_CASE("Unicode", "[hide]")
                     for (int byte2 = 0x80; byte2 <= 0xBF; ++byte2)
                     {
                         check_utf8string(false, byte1, byte2);
+                        check_utf8dump(false, byte1, byte2);
                     }
                 }
             }
@@ -668,6 +778,7 @@ TEST_CASE("Unicode", "[hide]")
                         for (int byte3 = 0x80; byte3 <= 0xBF; ++byte3)
                         {
                             check_utf8string(false, byte1, byte2, byte3);
+                            check_utf8dump(false, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -690,6 +801,7 @@ TEST_CASE("Unicode", "[hide]")
                             for (int byte4 = 0x80; byte4 <= 0xBF; ++byte4)
                             {
                                 check_utf8string(false, byte1, byte2, byte3, byte4);
+                                check_utf8dump(false, byte1, byte2, byte3, byte4);
                             }
                         }
                     }
@@ -713,6 +825,7 @@ TEST_CASE("Unicode", "[hide]")
                             for (int byte4 = 0x80; byte4 <= 0xBF; ++byte4)
                             {
                                 check_utf8string(false, byte1, byte2, byte3, byte4);
+                                check_utf8dump(false, byte1, byte2, byte3, byte4);
                             }
                         }
                     }
@@ -736,6 +849,7 @@ TEST_CASE("Unicode", "[hide]")
                                 }
 
                                 check_utf8string(false, byte1, byte2, byte3, byte4);
+                                check_utf8dump(false, byte1, byte2, byte3, byte4);
                             }
                         }
                     }
@@ -756,6 +870,7 @@ TEST_CASE("Unicode", "[hide]")
                             for (int byte4 = 0x80; byte4 <= 0xBF; ++byte4)
                             {
                                 check_utf8string(true, byte1, byte2, byte3, byte4);
+                                check_utf8dump(true, byte1, byte2, byte3, byte4);
                             }
                         }
                     }
@@ -767,6 +882,7 @@ TEST_CASE("Unicode", "[hide]")
                 for (int byte1 = 0xF4; byte1 <= 0xF4; ++byte1)
                 {
                     check_utf8string(false, byte1);
+                    check_utf8dump(false, byte1);
                 }
             }
 
@@ -777,6 +893,7 @@ TEST_CASE("Unicode", "[hide]")
                     for (int byte2 = 0x80; byte2 <= 0x8F; ++byte2)
                     {
                         check_utf8string(false, byte1, byte2);
+                        check_utf8dump(false, byte1, byte2);
                     }
                 }
             }
@@ -790,6 +907,7 @@ TEST_CASE("Unicode", "[hide]")
                         for (int byte3 = 0x80; byte3 <= 0xBF; ++byte3)
                         {
                             check_utf8string(false, byte1, byte2, byte3);
+                            check_utf8dump(false, byte1, byte2, byte3);
                         }
                     }
                 }
@@ -812,6 +930,7 @@ TEST_CASE("Unicode", "[hide]")
                             for (int byte4 = 0x80; byte4 <= 0xBF; ++byte4)
                             {
                                 check_utf8string(false, byte1, byte2, byte3, byte4);
+                                check_utf8dump(false, byte1, byte2, byte3, byte4);
                             }
                         }
                     }
@@ -835,6 +954,7 @@ TEST_CASE("Unicode", "[hide]")
                             for (int byte4 = 0x80; byte4 <= 0xBF; ++byte4)
                             {
                                 check_utf8string(false, byte1, byte2, byte3, byte4);
+                                check_utf8dump(false, byte1, byte2, byte3, byte4);
                             }
                         }
                     }
@@ -858,6 +978,7 @@ TEST_CASE("Unicode", "[hide]")
                                 }
 
                                 check_utf8string(false, byte1, byte2, byte3, byte4);
+                                check_utf8dump(false, byte1, byte2, byte3, byte4);
                             }
                         }
                     }

{"test-json_pointer_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access2_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-items_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-modifiers_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-constructor1_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-reference_access_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-comparison_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_lexer_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_const_iterator_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-wstring_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_iterator_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_minver_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-udt_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_const_iterator_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_add_subdirectory_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-constructor2_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-cbor_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-allocator_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-inspection_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-algorithms_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-testsuites_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-comparison_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-to_chars_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-constructor2_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-meta_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-allocator_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-readme_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-concepts_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-pointer_access_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-serialization_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-msgpack_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-msgpack_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-convenience_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-conversions_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_parser_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access1_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-wstring_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-readme_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-noexcept_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access1_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-inspection_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_iterator_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-algorithms_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-alt-string_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-alt-string_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-items_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_minver_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-conversions_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-noexcept_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-concepts_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-merge_patch_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators2_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-pointer_access_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators1_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-constructor1_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-cbor_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-modifiers_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-json_patch_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-to_chars_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-capacity_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access2_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-ubjson_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-serialization_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-testsuites_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators1_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-udt_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-reference_access_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_lexer_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-capacity_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-json_patch_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-json_pointer_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_parser_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-merge_patch_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators2_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-deserialization_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-ubjson_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-convenience_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-meta_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_add_subdirectory_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-deserialization_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}}
{"test-json_pointer_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access2_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-items_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-modifiers_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-constructor1_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-reference_access_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-comparison_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_lexer_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_const_iterator_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-wstring_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_iterator_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_minver_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-udt_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_const_iterator_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_add_subdirectory_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-constructor2_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-cbor_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-allocator_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-inspection_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-algorithms_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-testsuites_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-comparison_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-to_chars_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-constructor2_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-meta_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-allocator_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-readme_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-concepts_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-pointer_access_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-serialization_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-msgpack_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-msgpack_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-convenience_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-conversions_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_parser_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access1_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-wstring_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-readme_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-noexcept_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access1_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-inspection_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_iterator_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-algorithms_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-alt-string_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-alt-string_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-items_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_minver_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-conversions_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-noexcept_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-concepts_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-merge_patch_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators2_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-pointer_access_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators1_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-constructor1_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-cbor_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-modifiers_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-json_patch_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-to_chars_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-capacity_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access2_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-ubjson_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-serialization_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-testsuites_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators1_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-udt_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-reference_access_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_lexer_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-capacity_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-json_patch_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-json_pointer_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_parser_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-merge_patch_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators2_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-deserialization_all": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-ubjson_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-convenience_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-meta_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_add_subdirectory_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-deserialization_default": {"run": "PASS", "test": "NONE", "fix": "PASS"}}
{"passed_count": 86, "failed_count": 0, "skipped_count": 0, "passed_tests": ["test-regression_all", "test-element_access2_default", "test-items_all", "test-reference_access_default", "test-comparison_default", "test-class_const_iterator_all", "test-wstring_default", "cmake_import_minver_build", "test-udt_all", "test-class_const_iterator_default", "cmake_add_subdirectory_configure", "test-constructor2_default", "test-cbor_all", "test-allocator_default", "test-testsuites_default", "test-to_chars_all", "test-allocator_all", "test-readme_all", "test-pointer_access_default", "test-msgpack_all", "test-regression_default", "test-conversions_default", "test-wstring_all", "test-readme_default", "test-noexcept_default", "test-class_iterator_default", "test-algorithms_default", "test-alt-string_all", "test-alt-string_default", "test-items_default", "cmake_import_minver_configure", "test-merge_patch_default", "test-constructor1_default", "test-cbor_default", "test-iterators1_default", "test-udt_default", "test-reference_access_all", "test-capacity_default", "test-meta_default", "cmake_add_subdirectory_build", "test-json_pointer_default", "test-modifiers_all", "test-constructor1_all", "cmake_import_build", "test-class_lexer_default", "test-class_iterator_all", "test-inspection_all", "test-algorithms_all", "test-comparison_all", "test-constructor2_all", "test-meta_all", "test-concepts_all", "test-unicode_default", "test-serialization_all", "test-msgpack_default", "test-convenience_all", "test-class_parser_default", "test-element_access1_all", "test-element_access1_default", "test-inspection_default", "test-unicode_all", "test-conversions_all", "test-noexcept_all", "test-concepts_default", "test-iterators2_all", "test-pointer_access_all", "test-iterators1_all", "test-modifiers_default", "test-json_patch_all", "test-to_chars_default", "test-capacity_all", "test-element_access2_all", "test-ubjson_all", "test-serialization_default", "test-testsuites_all", "test-class_lexer_all", "test-json_patch_default", "test-json_pointer_all", "test-class_parser_all", "test-merge_patch_all", "test-iterators2_default", "cmake_import_configure", "test-deserialization_all", "test-ubjson_default", "test-convenience_default", "test-deserialization_default"], "failed_tests": [], "skipped_tests": []}
{"passed_count": 0, "failed_count": 0, "skipped_count": 0, "passed_tests": [], "failed_tests": [], "skipped_tests": []}
{"passed_count": 86, "failed_count": 0, "skipped_count": 0, "passed_tests": ["test-regression_all", "test-element_access2_default", "test-items_all", "test-reference_access_default", "test-comparison_default", "test-class_const_iterator_all", "test-wstring_default", "cmake_import_minver_build", "test-udt_all", "test-class_const_iterator_default", "cmake_add_subdirectory_configure", "test-constructor2_default", "test-cbor_all", "test-allocator_default", "test-testsuites_default", "test-to_chars_all", "test-allocator_all", "test-readme_all", "test-pointer_access_default", "test-msgpack_all", "test-regression_default", "test-conversions_default", "test-wstring_all", "test-readme_default", "test-noexcept_default", "test-class_iterator_default", "test-algorithms_default", "test-alt-string_all", "test-alt-string_default", "test-items_default", "cmake_import_minver_configure", "test-merge_patch_default", "test-constructor1_default", "test-cbor_default", "test-iterators1_default", "test-udt_default", "test-reference_access_all", "test-capacity_default", "test-meta_default", "cmake_add_subdirectory_build", "test-json_pointer_default", "test-modifiers_all", "test-constructor1_all", "cmake_import_build", "test-class_lexer_default", "test-class_iterator_all", "test-inspection_all", "test-algorithms_all", "test-comparison_all", "test-constructor2_all", "test-meta_all", "test-concepts_all", "test-unicode_default", "test-serialization_all", "test-msgpack_default", "test-convenience_all", "test-class_parser_default", "test-element_access1_all", "test-element_access1_default", "test-inspection_default", "test-unicode_all", "test-conversions_all", "test-noexcept_all", "test-concepts_default", "test-iterators2_all", "test-pointer_access_all", "test-iterators1_all", "test-modifiers_default", "test-json_patch_all", "test-to_chars_default", "test-capacity_all", "test-element_access2_all", "test-ubjson_all", "test-serialization_default", "test-testsuites_all", "test-class_lexer_all", "test-json_patch_default", "test-json_pointer_all", "test-class_parser_all", "test-merge_patch_all", "test-iterators2_default", "cmake_import_configure", "test-deserialization_all", "test-ubjson_default", "test-convenience_default", "test-deserialization_default"], "failed_tests": [], "skipped_tests": []}