std::optional<base::Value> json_val =
base::JSONReader::Read(R"json(
{
"header": {
"key1": "m/s",
"key2": "km",
"key3": "m/s"
},
"method":"POST",
"url":"abd",
"body":"{\"aa\":\"cc\"}"
}
)json");
if (json_val.has_value() && json_val->is_dict()) {
for (const auto it : json_val->GetDict()) {
const std::string* custom_format_name = it.second.GetIfString();
if (custom_format_name) {
if ("method" == *custom_format_name) {
}
else if ("method" == *custom_format_name) {
}
else if ("body" == *custom_format_name) {
}
}else if ("header" == it.first) {
for (const auto item : it.second.GetDict()) {
const std::string* item_format_name = item.second.GetIfString();
if (item_format_name) {
}
}
}
}