MCPcopy Create free account
hub / github.com/Icinga/icinga2 / BeginContainer

Method BeginContainer

lib/base/json.cpp:245–254  ·  view source on GitHub ↗

* Begins a JSON container (object or array) by writing the opening character and adjusting the * indentation level if pretty-printing is enabled. * * @param openChar The character that opens the container (either '{' for objects or '[' for arrays). */

Source from the content-addressed store, hash-verified

243 * @param openChar The character that opens the container (either '{' for objects or '[' for arrays).
244 */
245void JsonEncoder::BeginContainer(char openChar)
246{
247 if (m_Pretty) {
248 m_Indent += m_IndentSize;
249 if (m_IndentStr.size() < m_Indent) {
250 m_IndentStr.resize(m_IndentStr.size() * 2, ' ');
251 }
252 }
253 m_Writer->write_character(openChar);
254}
255
256/**
257 * Ends a JSON container (object or array) by writing the closing character and adjusting the

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
write_characterMethod · 0.45

Tested by

no test coverage detected