I should probably leave it to a native-speaker or someone with a better understanding to answer.
But, a quick answer is that when you address someone there's never a particle like は or が or を following. If you see ジョン without a particle or ジョンよ it's most likely direct address. But also, context often makes it very clear that someone is being addressed.
Also, the older the material you read the more structured the writing style tends to be. So whereas in casual speech particles can often be omitted, you are not likely to see this in literature from earlier periods. But even when particles happen to be omitted, you can usually tell.
If I write in English
John pass the peas!
with a proper context, like you know John is sitting with Nancy at the dinner table, it's not too difficult to understand even without a comma.
The form of the verb itself can be a give away. Is it a command, is it an invitation, is it a suggestion?
Yet also, when we speak, there are no commas. Commas are a mere visual clue in written text. In English, we barely have any inflected forms. In the spoken word, we can hear the intonation and rhythm and understand what's being said. In the written word, for English, this is all virtually lost. And so in the written word, in English, we need visual clues to guide and assist us--in fact, we've come to depend upon punctuation to a certain extent that makes reading older documents a challenge, particularly those from previous era when punctuation may have been less indulged in.
In any Japanese sentence, the verb must be inflected one way or another. The form of the verb conveys a lot of information: いく is not a command, it's a declarative sentence. いこう is a statement that conveys some kind of intention. いけ is clearly a command.
To say ジョンいく sounds a bit odd. What might you mean by it? But, to say ジョンいこう or ジョンいけ can make sense pretty much on their own, no punctuation is necessary in the written word. (Perhaps with proper context, ジョンいく could sound natural, as in "John, I'm going.")