Pass HTML in Json

I’m uploading product descriptions via REST API. Often the descriptions contain html code and/or line-feeds. How can I pass that kind of data without destroying the JSON-formatting?

I tried having the description in a variable and then send the variable in HTTP Request but that didn’t work.

@HenrikX - can you share a sample input description with html codes along with json format?

Not sure if I understood. I have a string (Long_desc) containing html code. Here is an example. htmlexample.txt (9.4 KB)
That string I want to be part of a API call using Json.

Example Json
{ ““langCode””: ““sv””, ““name””: “”"+Titel +""", ““shortDescription””: “”" +Short_desc +""","“longDescription”": “”" +Long_desc +""" }

Hello Henrik,
In this video I work with a complex JSON:

Cristian Negulescu