John Kerry, and the US government in general, seem to be confused.
When someone is covertly passing State Secrets (details of defense systems, high value business transactions, etc) to another government or company, that’s spying. The information flow is very simple - it goes from one secret HQ to another, and the target isn’t supposed to know, at least initially. The information may then be announced to the world to embarrass the target, usually by the foreign government or company, or they may attack the target militarily using the information to their advantage; either way, the initial part of it, the bit where the information stayed secret, was the spying.
When the supposed spy overtly splatters your state secrets all over the international media, and when that evidence suggests a legitimate case that you broke the law, this is called whistle-blowing, not spying.