| 182 | |
| 183 | template<typename MapKey, typename MapValue, typename ConvertKey, typename ConvertValue> |
| 184 | std::unordered_map<MapKey, MapValue> unmarshallMap(const Value& value, |
| 185 | const Ref<BridgeContext>& /*bridgeContext*/, |
| 186 | ConvertKey&& convertKey, |
| 187 | ConvertValue&& convertValue) { |
| 188 | std::unordered_map<MapKey, MapValue> out; |
| 189 | |
| 190 | if (value.isMap()) { |
| 191 | for (const auto& it : *value.getMap()) { |
| 192 | out[convertKey(Value(it.first))] = convertValue(it.second); |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | return out; |
| 197 | } |
| 198 | |
| 199 | template<typename VecValue, typename ConvertValue> |
| 200 | std::vector<VecValue> unmarshallVector(const Value& value, |