| 408 | template<typename ContainerType> |
| 409 | struct ArrayHandler { |
| 410 | inline static void Write(JSONWriter *writer, const ContainerType &array) { |
| 411 | typedef typename ContainerType::value_type ElemType; |
| 412 | writer->BeginArray(array.size() > 10 || !dmlc::is_pod<ElemType>::value); |
| 413 | for (typename ContainerType::const_iterator it = array.begin(); |
| 414 | it != array.end(); ++it) { |
| 415 | writer->WriteArrayItem(*it); |
| 416 | } |
| 417 | writer->EndArray(); |
| 418 | } |
| 419 | inline static void Read(JSONReader *reader, ContainerType *array) { |
| 420 | typedef typename ContainerType::value_type ElemType; |
| 421 | array->clear(); |
nothing calls this directly
no test coverage detected