* Writes a separator (comma) and an indentation string if pretty-printing is enabled. * * This function is used to separate items in a JSON array or object and to maintain the correct indentation level. * * @param emitComma Whether to emit a comma. This is typically true for all but the first item in a container. */
| 281 | * @param emitComma Whether to emit a comma. This is typically true for all but the first item in a container. |
| 282 | */ |
| 283 | void JsonEncoder::WriteSeparatorAndIndentStrIfNeeded(bool emitComma) const |
| 284 | { |
| 285 | if (emitComma) { |
| 286 | Write(","); |
| 287 | } |
| 288 | if (m_Pretty) { |
| 289 | Write("\n"); |
| 290 | m_Writer->write_characters(m_IndentStr.c_str(), m_Indent); |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | /** |
| 295 | * Wraps any writer of type @c nlohmann::detail::output_adapter_t<char> into a Flusher |
nothing calls this directly
no test coverage detected