You can translate the question and the replies:

JSON exposed data discrepancy

Hi, I have exposed data into JSOn from Denodo API, the source system from which denodo is getting data is in form like this,it is in two line India - 123456; INDIA When exposed this data from denodo into JSOn format using API I am getting output: India - 123456;\nINDIA How can I eliminate this \n
17-06-2021 03:49:59 -0400

1 Answer

Hi, The ‘\n’ character that you see in the JSON return is an escape character that represents a “new line” (‘Enter’ or ‘Carriage Return’) in the underlying Text. This ‘newline’ will not be shown in the Virtual DataPort’s UI, but will appear when JSON needs to represent this value in a string. Therefore, the easiest way to get rid of it is to remove the characters that need to be escaped from the underlying data, or simply avoid extracting these characters in the first place. If I know the format of the target data when adding a new Delimited Source, I can define a [Tuple Pattern]( to extract only the expected values that I need. The Pattern is a Regular Expression that will match to Fields in my Source Data, but will ignore anything that does not match the pattern. So, in this case, I could extract the values without including the unwanted newline. Hope this helps!
Denodo Team
22-06-2021 16:17:20 -0400
You must sign in to add an answer. If you do not have an account, you can register here