Lines Matching refs:jsonStr
375 void AppEventPack::AddBaseInfoToJsonString(std::stringstream& jsonStr) const in AddBaseInfoToJsonString()
377 jsonStr << "\"" << "domain_" << "\":" << "\"" << domain_ << "\","; in AddBaseInfoToJsonString()
378 jsonStr << "\"" << "name_" << "\":" << "\"" << name_ << "\","; in AddBaseInfoToJsonString()
379 jsonStr << "\"" << "type_" << "\":" << type_ << ","; in AddBaseInfoToJsonString()
380 jsonStr << GetTimeInfo(); in AddBaseInfoToJsonString()
381 jsonStr << "\"" << "pid_" << "\":" << getpid() << ","; in AddBaseInfoToJsonString()
382 jsonStr << "\"" << "tid_" << "\":" << gettid() << ","; in AddBaseInfoToJsonString()
385 void AppEventPack::AddVectorToJsonString(std::stringstream& jsonStr, const std::vector<bool>& bs) c… in AddVectorToJsonString() argument
387 jsonStr << "["; in AddVectorToJsonString()
390 jsonStr << "],"; in AddVectorToJsonString()
396 jsonStr << (bs[i] ? "true" : "false") << ","; in AddVectorToJsonString()
398 jsonStr << (bs[len - 1] ? "true" : "false") << "],"; in AddVectorToJsonString()
401 void AppEventPack::AddVectorToJsonString(std::stringstream& jsonStr, const std::vector<char>& cs) c… in AddVectorToJsonString() argument
403 jsonStr << "["; in AddVectorToJsonString()
406 jsonStr << "],"; in AddVectorToJsonString()
412 jsonStr << "\"" << cs[i] << "\"" << ","; in AddVectorToJsonString()
414 jsonStr << "\"" << cs[len - 1] << "\"" << "],"; in AddVectorToJsonString()
417 void AppEventPack::AddVectorToJsonString(std::stringstream& jsonStr, const std::vector<int16_t>& sh… in AddVectorToJsonString() argument
419 jsonStr << "["; in AddVectorToJsonString()
422 jsonStr << "],"; in AddVectorToJsonString()
428 jsonStr << shs[i] << ","; in AddVectorToJsonString()
430 jsonStr << shs[len - 1] << "],"; in AddVectorToJsonString()
433 void AppEventPack::AddVectorToJsonString(std::stringstream& jsonStr, const std::vector<int>& is) co… in AddVectorToJsonString() argument
435 jsonStr << "["; in AddVectorToJsonString()
438 jsonStr << "],"; in AddVectorToJsonString()
444 jsonStr << is[i] << ","; in AddVectorToJsonString()
446 jsonStr << is[len - 1] << "],"; in AddVectorToJsonString()
449 void AppEventPack::AddVectorToJsonString(std::stringstream& jsonStr, const std::vector<int64_t>& ll… in AddVectorToJsonString() argument
451 jsonStr << "["; in AddVectorToJsonString()
454 jsonStr << "],"; in AddVectorToJsonString()
460 jsonStr << lls[i] << ","; in AddVectorToJsonString()
462 jsonStr << lls[len - 1] << "],"; in AddVectorToJsonString()
465 void AppEventPack::AddVectorToJsonString(std::stringstream& jsonStr, const std::vector<float>& fs) … in AddVectorToJsonString() argument
467 jsonStr << "["; in AddVectorToJsonString()
470 jsonStr << "],"; in AddVectorToJsonString()
476 jsonStr << TrimRightZero(std::to_string(fs[i])) << ","; in AddVectorToJsonString()
478 jsonStr << TrimRightZero(std::to_string(fs[len - 1])) << "],"; in AddVectorToJsonString()
481 void AppEventPack::AddVectorToJsonString(std::stringstream& jsonStr, const std::vector<double>& ds)… in AddVectorToJsonString() argument
483 jsonStr << "["; in AddVectorToJsonString()
486 jsonStr << "],"; in AddVectorToJsonString()
492 jsonStr << TrimRightZero(std::to_string(ds[i])) << ","; in AddVectorToJsonString()
494 jsonStr << TrimRightZero(std::to_string(ds[len - 1])) << "],"; in AddVectorToJsonString()
497 void AppEventPack::AddVectorToJsonString(std::stringstream& jsonStr, const std::vector<std::string>… in AddVectorToJsonString() argument
499 jsonStr << "["; in AddVectorToJsonString()
502 jsonStr << "],"; in AddVectorToJsonString()
508 jsonStr << "\"" << strs[i] << "\","; in AddVectorToJsonString()
510 jsonStr << "\"" << strs[len - 1] << "\"],"; in AddVectorToJsonString()
513 void AppEventPack::AddOthersToJsonString(std::stringstream& jsonStr, const AppEventParam param) con… in AddOthersToJsonString() argument
516 AddVectorToJsonString(jsonStr, param.value.valueUnion.bs_); in AddOthersToJsonString()
518 AddVectorToJsonString(jsonStr, param.value.valueUnion.cs_); in AddOthersToJsonString()
520 AddVectorToJsonString(jsonStr, param.value.valueUnion.shs_); in AddOthersToJsonString()
522 AddVectorToJsonString(jsonStr, param.value.valueUnion.is_); in AddOthersToJsonString()
524 AddVectorToJsonString(jsonStr, param.value.valueUnion.lls_); in AddOthersToJsonString()
526 AddVectorToJsonString(jsonStr, param.value.valueUnion.fs_); in AddOthersToJsonString()
528 AddVectorToJsonString(jsonStr, param.value.valueUnion.ds_); in AddOthersToJsonString()
530 AddVectorToJsonString(jsonStr, param.value.valueUnion.strs_); in AddOthersToJsonString()
532 jsonStr << "[]" << ","; in AddOthersToJsonString()
534 jsonStr << "\"\","; in AddOthersToJsonString()
555 std::stringstream jsonStr; in GetJsonString() local
556 jsonStr << "{"; in GetJsonString()
557 AddBaseInfoToJsonString(jsonStr); in GetJsonString()
559 jsonStr << "\"" << it->name << "\":"; in GetJsonString()
561 jsonStr << ((it->value.valueUnion.b_) ? "true" : "false") << ","; in GetJsonString()
563 jsonStr << "\"" << it->value.valueUnion.c_ << "\"" << ","; in GetJsonString()
565 jsonStr << it->value.valueUnion.sh_ << ","; in GetJsonString()
567 jsonStr << it->value.valueUnion.i_ << ","; in GetJsonString()
569 jsonStr << it->value.valueUnion.ll_ << ","; in GetJsonString()
571 jsonStr << TrimRightZero(std::to_string(it->value.valueUnion.f_)) << ","; in GetJsonString()
573 jsonStr << TrimRightZero(std::to_string(it->value.valueUnion.d_)) << ","; in GetJsonString()
575 jsonStr << "\"" << it->value.valueUnion.str_ << "\","; in GetJsonString()
577 AddOthersToJsonString(jsonStr, *it); in GetJsonString()
581 jsonStr.seekp(-1, std::ios_base::end); in GetJsonString()
582 jsonStr << "}" << std::endl; in GetJsonString()
583 return jsonStr.str(); in GetJsonString()