If the characters avoid the encounter through diplomacy, are they awarded XP by the monsters? [duplicate]

This question already has an answer here:

  • How many XP should you grant if the match was not resolved through the battle? [double]

    3 answers

  • My group missed a combat encounter. Should they continue to get XP?

    8 replies

Let's say that a part of the dungeon with X monsters can be passed through combat OR through careful diplomacy, can players be awarded XP points in the same way if they choose the latter? It seems to be a great way to reward role play instead of just fighting, and players can save spell / rest spaces at the cost of loot. Is that something that D&D admits?