pub fn serialize_message(message: &RemoteMessage) -> Result<String, Error>
Helper to serialize messages to JSON