mirror of
https://github.com/nlohmann/json.git
synced 2025-07-22 15:21:52 +03:00
🐛 skipping BOM for iterators #602
I totally forgot about byte order marks in this scenario.
This commit is contained in:
@ -1169,4 +1169,10 @@ TEST_CASE("regression tests")
|
||||
std::vector<uint8_t> vec = {'"', '\\', '"', 'X', '"', '"'};
|
||||
CHECK_THROWS_AS(json::parse(vec), json::parse_error);
|
||||
}
|
||||
|
||||
SECTION("issue #602 - BOM not skipped when using json:parse(iterator)")
|
||||
{
|
||||
std::string i = "\xef\xbb\xbf{\n \"foo\": true\n}";
|
||||
CHECK_NOTHROW(json::parse(i.begin(), i.end()));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user