Support Questions

Find answers, ask questions, and share your expertise

How to remove ETX character from json value ?

avatar
Contributor

Hello,

I could not split a JSON due to a special ETX character existing in a JSON value, SplitJson processor returns an error that it is not a Valid JSON.

The JSON looks like that:
[ {"key_data":"val_data"},

 {"key_data":"val_ETXdata"},

 {"key_data":"val_data"},

 {"key_data":"val_data"},... ]

 

Ghilani_1-1668002267091.png

I used The next regex expression to replace it but it doesn't work:

\x03(?=[^"]*")
also
[\x03](?=[^"]*")
 
can someone show me a trick to remove it please, I would appreciate it.

 

 

 

10 REPLIES 10

avatar
Contributor

I think everything works fine, the json flowfiles are the response of an invokeHttp request to an API, I receive more than 5000 flowfiles, each flowfile contains 200 records.
Problems happen only with 4 files that contain the ETX symbol.