I know a lot of reporters certainly will go to jail to defend confidential sources. Some have even gone to jail for an issue like this. But I can't say that's the norm.
As far as I'm concerned, the entire reason for becoming a writer is not having to get up in the morning.
You can write a great book and be ignored. Literary history is full of classics that were under-appreciated in their own time.