Josiah did what was pleasing to the Lord; he followed the example of his ancestor King David, strictly obeying all the laws of God.