10template <
typename T,
typename Value>
11std::vector<T> ParseMapToArray(
const Value& value) {
12 value.CheckObjectOrNull();
13 std::vector<T> parsed_array;
14 parsed_array.reserve(value.GetSize());
16 for (
auto [elem_name, elem_value] : Items(value)) {
17 auto parsed = elem_value.
template As<T>();
18 parsed.SetName(std::move(elem_name));
19 parsed_array.emplace_back(std::move(parsed));