diff --git a/src/afterfact.rs b/src/afterfact.rs index 1c86c7fc4..5713ebf65 100644 --- a/src/afterfact.rs +++ b/src/afterfact.rs @@ -1299,19 +1299,11 @@ fn _get_timestamp(output_option: &OutputOption, time: &DateTime) -> i64 { } /// json出力の際に配列として対応させるdetails,MitreTactics,MitreTags,OtherTagsに該当する場合に配列を返す関数 -fn _get_json_vec(profile: &Profile, target_data: &String) -> Vec { +fn _get_json_vec(profile: &Profile, target_data: &str) -> Vec { match profile { Profile::MitreTactics(_) | Profile::MitreTags(_) | Profile::OtherTags(_) => { target_data.split(": ").map(|x| x.to_string()).collect() } - Profile::Details(_) | Profile::AllFieldInfo(_) | Profile::ExtraFieldInfo(_) => { - let ret: Vec = target_data.split(" ¦ ").map(|x| x.to_string()).collect(); - if target_data == &ret[0] && !utils::contains_str(target_data, ": ") { - vec![] - } else { - ret - } - } _ => vec![], } } @@ -1575,7 +1567,7 @@ pub fn output_json_str( output_stock.push(format!( "{}{last_contents_end}", _create_json_output_format( - &key, + key, &fmted_val, key.starts_with('\"'), fmted_val.starts_with('\"'),