James highlights the importance of mercy in keeping the spirit of the law. He exhorts us to speak and act as those who are to be judged by "a law of liberty," so that he sets no limit to the range of the law—meaning it covers all aspects of life.
In James 4:11, he warns us against speaking against the law or judging the law, that is, to assume the place of judge instead of "doer of the law." Our efforts should not be in judging someone else and whether or not they are keeping the law. However, we should be looking inwardly to determine whether or not we are doing what is required—not only in the letter of the law but especially in its spirit.
James would not have used such language unless he had a profound conviction of the perfection of the law as a rule of life for the saints redeemed from its condemnation. Thus, we can call it the perfect law of liberty—the royal law. Many Christians do not look at the law of God as being perfect. They pick and choose which parts of the law they will obey, ones they feel most comfortable with, and they ignore the rest. Yet the apostle says in James 2:10 that if we break one, we break them all.
All sin is lawlessness, as I John 3:4 states, and the sum of all lawkeeping is love of God and love of the brethren (Matthew 22:36-40; Romans 13:8-10), so the summary of the old law is echoed and endorsed. And it is continued—because Christ did not come to destroy the law but to magnify it (Matthew 5:17-18; Isaiah 42:21).