| 595 | } |
| 596 | |
| 597 | TypePtr restoreType(std::istream& in) { |
| 598 | static folly::once_flag kOnce; |
| 599 | |
| 600 | folly::call_once(kOnce, []() { Type::registerSerDe(); }); |
| 601 | |
| 602 | auto serialized = read<std::string>(in); |
| 603 | auto json = folly::parseJson(serialized); |
| 604 | return ISerializable::deserialize<Type>(json); |
| 605 | } |
| 606 | |
| 607 | void saveVector(const BaseVector& vector, std::ostream& out) { |
| 608 | // Encoding. |
no outgoing calls