Be obedient to the Scriptures and this conversation would be moot; i.e., James 5:12,
James is not condemning the taking of solemn oaths, such as God's before Abraham (Heb. 6:13), or Jesus' before Caiaphas (Mat. 26:63-64) or Paul's (Rom. 1:9; 9:1) or a person before the Lord (Ex. 22:1). Rather, he is condemning the flippant use of God's name or a sacred object to guarantee the truth of what is spoken.

