Select to view content in your preferred language

Hard return character (\r\n) in JSON breaks poll external website for JSON?

548
0
03-01-2022 08:10 AM
RussellLundstrumUSACE
Occasional Contributor

I am using geoevent server 10.8.0 and polling an external website for JSON, but it is not receiving anything. It has worked in the past, but it has suddenly stopped working without any known configuration changes.  I suspect it may be due to a line feed character in the data. There is a data input field that allows for a new line when entering a new record and has a JSON output that geoevent reads.

I didn't immediately find anything in the geoevent logs, so I ran a python script that also produced and error that directed me right to the record where I found "\r\n". And sure enough, when viewing this record in the editing/input system, it is a new line in the data field. I was able to add some code to the python script for a successful output, which basically ignores the "\r\n". So my questions are, does this line feed character in a JSON input break the poll-in? is there a way to make geoevent handle this situation as well? Again, I only SUSPECT this character is causing the geoevent issue, it may be something else entirely.

0 Kudos
0 Replies