| 431 | template<typename ContainerType> |
| 432 | struct MapHandler{ |
| 433 | inline static void Write(JSONWriter *writer, const ContainerType &map) { |
| 434 | writer->BeginObject(map.size() > 1); |
| 435 | for (typename ContainerType::const_iterator it = map.begin(); it != map.end(); ++it) { |
| 436 | writer->WriteObjectKeyValue(it->first, it->second); |
| 437 | } |
| 438 | writer->EndObject(); |
| 439 | } |
| 440 | inline static void Read(JSONReader *reader, ContainerType *map) { |
| 441 | typedef typename ContainerType::mapped_type ElemType; |
| 442 | map->clear(); |
nothing calls this directly
no test coverage detected