LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

json add linefeed and end of line when formatting

Hi, 

Kindly ask for support

using json text addon to convert labview string to json. 

I don't understand why the conversion adding  \n \r to the text. tried couple of solution found on the forum (json prettify) but nothing solve this issue. 

please see image below and code snippet

Tamir87_0-1742393453865.png

 

json adding lines feed.png

 

Any idea how to deal with it ? 

0 Kudos
Message 1 of 4
(148 Views)

HI tamir,

 


@Tamir87 wrote:

I don't understand why the conversion adding  \n \r to the text. 


Because those "\r" are already contained in your input string...

 

Where do we see a "\n" in your image?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(140 Views)

Hi,

 

These are escape sequences the function produces for line feeds / carriage returns because control characters and some special characters (such as " ) cannot be put as is in the json string. If you convert the JSON output back to a string, those will be converted back to actual line feeds / carriage returns.

 

Regards,

Raphaël.

0 Kudos
Message 3 of 4
(115 Views)

sorry in this example I didnt show the \n 

0 Kudos
Message 4 of 4
(109 Views)