I am trying to make JSON that I would save as domino document. Everything works fine, except when handling rich text format field. The problem is this: my html editor puts newline and tabs after every html beginning tag, so when I try to get rtf in which that html is saved, it also contains newlines, tabs etc. I tried replacing them, but nothing happened.
This is how rtf looks like (and can not be changed):
<p>
some sample text</p>
This is how I'm trying to get data from rtf:
somestring = viewdata.getDocument().getMimeEntity("myField").getContentAsText();
How I tried replacing newline:
somestring.replaceAll("\n", "");
somestring.replaceAll("\\n", "");
somestring.replaceAll("\\\n", "");
I would like to get something like
<p>some sample text</p>
I also tryed approach where jsonGenerator would hadle this for me. It returns json full of /t and /n chars. And also I had some other problems with jsonGenerator because my JSON has more than one level in depth. So returning string without newline and tab would probably be the simpliest solution.
Does anyone have any idea how to solve this problem?