| 1608 | } |
| 1609 | |
| 1610 | void JsonWriter::BeginValue(bool isString) |
| 1611 | { |
| 1612 | if (!m_Stack.empty()) |
| 1613 | { |
| 1614 | StackItem& currItem = m_Stack.back(); |
| 1615 | if (currItem.type == COLLECTION_TYPE_OBJECT && currItem.valueCount % 2 == 0) |
| 1616 | { |
| 1617 | D3D12MA_ASSERT(isString); |
| 1618 | } |
| 1619 | |
| 1620 | if (currItem.type == COLLECTION_TYPE_OBJECT && currItem.valueCount % 2 == 1) |
| 1621 | { |
| 1622 | m_SB.Add(L':'); m_SB.Add(L' '); |
| 1623 | } |
| 1624 | else if (currItem.valueCount > 0) |
| 1625 | { |
| 1626 | m_SB.Add(L','); m_SB.Add(L' '); |
| 1627 | WriteIndent(); |
| 1628 | } |
| 1629 | else |
| 1630 | { |
| 1631 | WriteIndent(); |
| 1632 | } |
| 1633 | ++currItem.valueCount; |
| 1634 | } |
| 1635 | } |
| 1636 | |
| 1637 | void JsonWriter::WriteIndent(bool oneLess) |
| 1638 | { |