Depending on how you're actually displaying your text, this may or may not help. But to apply formatting in my dialogue system, I run the strings through a formatting function. (I believe it was actually Kyatric that came up with this method.)
So any BB Code or line breaks are written into the JSON file (using round brackets where applicable), then the function replaces that with the correct BB Code tags.
I talk about it in this tutorial, and there should be a project file attached.