Can I just gush about this scene a little bit? Because let’s be honest: Sherlock has just thrown it in everyone’s faces that he’s smarter (more observant) than all of them combined. And what does he instinctually do? He looks up to John for approval - for praise - for silent acknowledgement that he was brilliant, extraordinary, amazing, and so on.
And John - oh, John - John knowing how important this trial is, clearly conveys to Sherlock that that was not okay. It’s one of the few times he openly disapproves of Sherlock’s actions. Normally, he just mumbles that Sherlock should tone it down a bit because he understands that Sherlock cannot help himself. At this trial, though, John cannot even humor Sherlock. Moriarty is on trial, and Sherlock is key to any chance of Moriarty going to jail.
And in the next second, it’s clear that Sherlock has caught that signal - he’s seen John’s disapproval, and his smile dies a bit. He realizes that John most definitely did not approve, and it’s clear that he feels a bit rebuked by that.
Not that that stops him, though.
^I have nothing to add. It is kinda perf all on it’s own.