“But to what shall I compare this generation? It is like children sitting in the marketplaces and calling to their playmates,
 “‘We played the flute for you, and you did not dance;
we sang a dirge, and you did not mourn.’
 For John came neither eating nor drinking, and they say, ‘He has a demon.’  The Son of Man came eating and drinking, and they say, ‘Look at him! A glutton and a drunkard, a friend of tax collectors and sinners!’ Yet wisdom is justified by her deeds.” (Matthew 11:16-19 ESV)
In Matthew 11:16-19, Jesus is essentially “castigating the people for their spiritual dullness” (D.A. Carson, Expositors Bible Commentary, vol. 8, pg. 271). Jesus concludes with this statement: “Yet wisdom is justified by her deeds.” In Luke 7:35 the words of Jesus are, “Yet wisdom is justified by all her children.” There are essentially two points that need to be clarified: 1. What does Jesus mean? and 2. Why the different wording between Matthew and Luke, and how can the two be harmonized?
Let’s take the second question to begin. In the ESV Bible in Matthew 11:19, there is a footnote which indicates ‘some manuscripts read children.’ The wording in Luke is probably the original, because it has more manuscript evidence according to the Nestle-Aland Greek New Testament 27th edition. Therefore several copyists who were copying Matthew’s gospel probably changed the wording from “deeds” to “children” in order to match the wording in Luke.
Even though there is a discrepancy, it does not rule out the fact that Jesus may have said both phrases on different occasions. The saying “wisdom is justified by…” could have been common to teachers of his day, and wisdom being associated with God was certainly prevalent in the Old Testament (Proverbs 1, Proverbs 8).
But if Jesus is making the same point on this occasion, how can we harmonize the meanings of the two phrases? One option is to understand the phrase “all her children” as the people who would become followers of Jesus after he spoke these words. That is, God’s wisdom would be justified in the lifestyles of John the Baptist and Jesus because people would come to faith as a result. This seems likely, but in my view it doesn’t give enough attention to the specific actions which offended the generation to which Jesus was speaking.
Another way to understand the phrase “all her children” is as a metaphor for John the Baptist and Jesus themselves (and perhaps other prophets who preceded John). That is, God’s wisdom is apparent in both Jesus and John’s lives, even though they had different roles in Gods’ plan of salvation. Another way to say it is this: “When you see John the Baptist, you see the wisdom of God on display, announcing the Messiah and preaching repentance in a remote and harsh setting. Likewise, when you see Jesus, you see the wisdom of God on display, in person. He was willing to go and eat with sinners. He extended grace beyond peoples’ religious conventions.” This view brings the meaning closer to the phrase in Matthew, “Yet wisdom is justified by her deeds”. Each person was known by his actions: John took a ‘separatist’ approach as he announced the coming of Christ, and Jesus took a more ‘sociable’ approach announcing the kingdom– mingling with different people and eating with so called “sinners”.
Lastly, viewing the phrase as a metaphor, that is, thinking of Jesus and John the Baptist as wisdom’s “children”, serves to highlight the contrast Jesus makes in the preceding verses. He is rebuking “this generation” because they are acting childish– they are not pleased with either option, John the Baptist or Jesus, just like children who are fickle about playing a game. Given a happy game, they refuse. Given a sad game, they refuse again.
Jesus is rebuking “this generation” because the people are fickle, stubborn, and cynical. Jesus is calling out “this generation” for being childish, not childlike, in their faith. Indeed, those who would follow Christ later on would be the ones who “become like little children” to enter the kingdom.
Wisdom is essentially knowledge applied to life. God’s wisdom is pure, peaceable, gentle, open to reason, full of mercy and good fruits, impartial and sincere. The group to whom Jesus was speaking had plenty of knowledge, but they did not want to change their lives to be in line with that knowledge. Nor did they recognize the kingdom of God and the presence of King Jesus among them.