I am getting some values out of my database and produce some JSON. This JSON is then consumed by the client. But as soon as there is a line break in the string which is read out of the database, the client fails to interpret the JSON and the web application is not showing any data. The String in the database looks like this:
Test Action Item ZusammenführenTest Action Item ZusammenführenTest Action Item ZusammenführenTest Action Item ZusammenführenTest Action Item ZusammenführenTest Action Item Zusammenführen
fsd
fsa
df
asdf
as
dfs
fd
sad
f
sadf
sad
so there are several linebreaks. The JSON object produced by the java code in the backend looks like this:
{ "id": 61,
"status": "erledigtEntw",
"text": "KORE_AI_1",
"beschreibung": "Test Action Item ZusammenführenTest Action Item
ZusammenführenTest Action Item ZusammenführenTest Action Item ZusammenführenTest Action Item ZusammenführenTest Action Item Zusammenführen
fsd
fsa
df
asdf
as
dfs
fd
sad
f
sadf
sad",
"tags": "KORE"
},
and there seems to be the problem. Maybe the client doesn't recognize it as a well formed JSON anymore. How can I change this so the output is well formed again? How can i track and encode the linebreaks, if this is possible?