In the “Add-on details > description” section, I’ve tried pasting nicely formatted JSON, but the white spacing wasn’t preserved and it didn’t look too great!
I tried using HTML’s pre tag, but that failed. I also tried some markdown beginning with back ticks followed by javascript and ending with back ticks, but that equally failed!
The description in the JSON manifest isn’t meant to be formatted. You can format the description on your AMO listing (assuming your add-on is listed), and that will be updated in the Add-ons Manager after the add-on is installed.