wa_msg_parser 0.2.2

a little Library to parse the Whatsapp Message Export txt to a Message Struct
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[cfg(feature = "json")]
use crate::Message;

#[cfg(feature = "json")]
pub fn messages_to_json(messages: &[Message]) -> String {
    serde_json::to_string(messages).unwrap()
}

#[cfg(feature = "json")]
pub fn json_to_messages(json_str: &str) -> Vec<Message> {
    serde_json::from_str(json_str).unwrap()
}