| 82 | } |
| 83 | |
| 84 | bool XChart::Parse(const std::string &dsl) { |
| 85 | this->logTracer_->trace("#dsl dataSize: %lu", dsl.size()); |
| 86 | nlohmann::json _dsl = xg::json::ParseString(dsl); |
| 87 | if (!_dsl.is_object()) { |
| 88 | this->logTracer_->trace("#dsl json is invalid"); |
| 89 | return false; |
| 90 | } |
| 91 | return ParseObject(_dsl); |
| 92 | } |
| 93 | |
| 94 | bool XChart::ParseObject(const nlohmann::json &dsl) { |
| 95 | //线上已经使用了data作为key,这里兼容下 |
no test coverage detected