Only converts notification to json if it's going to send it