| 1559 | //========================================================================== |
| 1560 | |
| 1561 | FString DictionaryToString(const Dictionary &dict) |
| 1562 | { |
| 1563 | Dictionary::ConstPair *pair; |
| 1564 | Dictionary::ConstIterator i { dict.Map }; |
| 1565 | |
| 1566 | rapidjson::StringBuffer buffer; |
| 1567 | rapidjson::Writer<rapidjson::StringBuffer> writer(buffer); |
| 1568 | writer.StartObject(); |
| 1569 | |
| 1570 | while (i.NextPair(pair)) |
| 1571 | { |
| 1572 | writer.Key(pair->Key.GetChars()); |
| 1573 | writer.String(pair->Value.GetChars()); |
| 1574 | } |
| 1575 | |
| 1576 | writer.EndObject(); |
| 1577 | |
| 1578 | FString contents { buffer.GetString(), buffer.GetSize() }; |
| 1579 | return contents; |
| 1580 | } |
| 1581 | |
| 1582 | Dictionary *DictionaryFromString(const FString &string) |
| 1583 | { |