| 14 | namespace Valdi { |
| 15 | |
| 16 | static bool needsUnicodeEscaping(std::string_view str) { |
| 17 | const auto* it = reinterpret_cast<const Byte*>(str.data()); |
| 18 | const auto* end = it + str.size(); |
| 19 | |
| 20 | while (it != end) { |
| 21 | auto c = *it; |
| 22 | if (c >= 0x7f) { |
| 23 | return true; |
| 24 | } |
| 25 | it++; |
| 26 | } |
| 27 | |
| 28 | return false; |
| 29 | } |
| 30 | |
| 31 | JSONWriter::JSONWriter(ByteBuffer& output) : _output(output) {} |
| 32 |
no test coverage detected