Yup—he violated the law.
The problem is that the NSA and their contractors were and almost certainly still are spying on Americans, and are lying about it, or trading intelligence with foreign nations that do it—if that is legal it shouldn’t be, and if it is not every last one of them belongs in jail.
So, in my eyes, Snowden is the hero and the NSA and its contractors are the traitors.
He is the Sgt. Calley of this whole Spygate scandal. He is the low-level guy who went crazy and "shot up the place", while the "generals" who set up the thing that drove him crazy walk free.