| 36 | } |
| 37 | |
| 38 | size_t JsonLoader::Value::len() { |
| 39 | if (Type::ARRAY == m_type) { |
| 40 | auto t = safe_cast<JsonLoader::ArrayValue>(); |
| 41 | return t->m_obj.size(); |
| 42 | } else if (Type::OBJECT == m_type) { |
| 43 | auto t = safe_cast<JsonLoader::ObjectValue>(); |
| 44 | return t->m_obj.size(); |
| 45 | } |
| 46 | return 0; |
| 47 | } |
| 48 | |
| 49 | megdnn::SmallVector<std::unique_ptr<JsonLoader::Value>>& JsonLoader::Value::array() { |
| 50 | mgb_assert(Type::ARRAY == m_type); |
no test coverage detected