Skip to content

parse with issue string when get value the program abort #796

@gongzhxu

Description

@gongzhxu
std::string strJson =
    " 8:31:09.629981 T 1660933888 media_meeting.cpp 45]"
    " Destroy MediaMeeting [0x7fce7411cc78], audio_device=(nil), video_device=(nil)";

std::string strCmd;
Json::Reader reader;
Json::Value root;
try {
	if (reader.parse(strJson.c_str(), root)) {
		strCmd = root["cmd"].asString();
	}
} catch(...) {
	return;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions