diff --git a/src/cxon/README.md b/src/cxon/README.md index 11b7e4ee..d4ead8ef 100644 --- a/src/cxon/README.md +++ b/src/cxon/README.md @@ -438,13 +438,13 @@ the behavior of the library or to change the `JSON` language: namespace cxon { namespace json { // format traits struct format_traits : cio::format_traits { - // enables/disables UTF-8 string validation + // read: check UTF-8 encoding static constexpr bool validate_string_encoding = true; - // check for unescaped control characters + // read: check for unescaped control characters static constexpr bool validate_string_escapes = true; - // escape U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR (ECMA-262, 12.3 Line Terminators) + // write: escape U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR (ECMA-262, 12.3 Line Terminators) static constexpr bool produce_strict_javascript = false; // read/write: assume that strings to be read/written do not contain escape characters @@ -476,7 +476,7 @@ namespace cxon { namespace json { // format traits }} ``` -The correctness parameters can also be set with macros: +The correctness parameters can also be set with preprocessor macros: Parameter | Macro --------------------------|------------------------------------ diff --git a/src/cxon/lang/json/json.hxx b/src/cxon/lang/json/json.hxx index fc82b9ff..c9acc6d7 100644 --- a/src/cxon/lang/json/json.hxx +++ b/src/cxon/lang/json/json.hxx @@ -34,7 +34,7 @@ namespace cxon { namespace json { // format traits using write_error = json::write_error; static constexpr bool validate_string_encoding = CXON_JSON_VALIDATE_STRING_ENCODING; // read: validate input strings (utf-8) - static constexpr bool validate_string_escapes = CXON_JSON_VALIDATE_STRING_ESCAPES; // read: validate input strings (unescaped control characters) + static constexpr bool validate_string_escapes = CXON_JSON_VALIDATE_STRING_ESCAPES; // read: validate input strings for unescaped control characters static constexpr bool produce_strict_javascript = CXON_JSON_PRODUCE_STRICT_JAVASCRIPT; // write: escape U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR (ECMA-262, 12.3 Line Terminators) diff --git a/test/src/json/space/rapidjson.cxx b/test/src/json/space/rapidjson.cxx index ff0d7d80..8f536aa6 100644 --- a/test/src/json/space/rapidjson.cxx +++ b/test/src/json/space/rapidjson.cxx @@ -2,7 +2,7 @@ int main() { rapidjson::Document d; - auto constexpr opt = rapidjson::kParseValidateEncodingFlag|rapidjson::kParseFullPrecisionFlag; + auto constexpr opt = rapidjson::kParseValidateEncodingFlag|rapidjson::kParseFullPrecisionFlag; rapidjson::ParseResult r = d.Parse("[42]"); return !(r && d.IsArray() && d.GetArray().Size() == 1 && d.GetArray()[0] == 42); }