This is how we know that we know him: if we keep his commandments.

 First, as to its form, this passage is not exactly poetry but it is certainly poetical and strongly rhythmical. Therefore, it is to be interpreted as poetry ought to be. 