How to keep text format with indentation

Hi, I’m looking for a way to paste some text that includes indentation and such and needs to keep its format. I’ve tried using rich text, but it always ends up aligning all text to the left without respecting the original format. Would appreciate all help in figuring this out. Here is an example of how the text should look like:

{
“contact_address”: “PubMatic 601 Marshall St. Redwood City, CA 94063 USA”,
“contact_email”: “Eric Bozinny eric.bozinny@pubmatic.com”,
“version”: 1.0,
“identifiers”: [
{
“name”: “TAG-ID”,
“value”: “5d62403b186f2ace”
}
],
“ext”: {
“last_updated”: “04-06-2023”
},
“sellers”: [
{
“seller_id”: “20977”,
“name”: “MSNBC Inc.”,
“domain”: “msnbc.com”,
“seller_type”: “PUBLISHER”
},
{
“seller_id”: “23105”,
“name”: “Times Internet Limited”,
“domain”: “indiatimes.com”,
“seller_type”: “PUBLISHER”
},