| 6256 | } |
| 6257 | |
| 6258 | void VmaJsonWriter::BeginValue(bool isString) |
| 6259 | { |
| 6260 | if (!m_Stack.empty()) |
| 6261 | { |
| 6262 | StackItem& currItem = m_Stack.back(); |
| 6263 | if (currItem.type == COLLECTION_TYPE_OBJECT && |
| 6264 | currItem.valueCount % 2 == 0) |
| 6265 | { |
| 6266 | VMA_ASSERT(isString); |
| 6267 | } |
| 6268 | |
| 6269 | if (currItem.type == COLLECTION_TYPE_OBJECT && |
| 6270 | currItem.valueCount % 2 != 0) |
| 6271 | { |
| 6272 | m_SB.Add(": "); |
| 6273 | } |
| 6274 | else if (currItem.valueCount > 0) |
| 6275 | { |
| 6276 | m_SB.Add(", "); |
| 6277 | WriteIndent(); |
| 6278 | } |
| 6279 | else |
| 6280 | { |
| 6281 | WriteIndent(); |
| 6282 | } |
| 6283 | ++currItem.valueCount; |
| 6284 | } |
| 6285 | } |
| 6286 | |
| 6287 | void VmaJsonWriter::WriteIndent(bool oneLess) |
| 6288 | { |