| 593 | } |
| 594 | |
| 595 | void FormattedJsonBuilderStream::putValue(Json const& value, Maybe<String> formatting) { |
| 596 | FormattedJson formattedValue = value; |
| 597 | if (formatting.isValid()) |
| 598 | formattedValue = formattedValue.formattedAs(*formatting); |
| 599 | |
| 600 | if (m_stack.size() > 0) |
| 601 | current().appendElement(ValueElement{formattedValue}); |
| 602 | else { |
| 603 | m_root = formattedValue; |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | void JsonStreamer<FormattedJson>::toJsonStream(FormattedJson const& val, JsonStream& stream, bool sort) { |
| 608 | if (val.isType(Json::Type::Object)) |
nothing calls this directly
no test coverage detected