CMK-330

TitleImprove robustness of agent output parsing
ComponentBase
Date2018-02-20
StateNew
ClassTask


Currently, agent output is turned into a table by splitting by line and then splitting by a field separator. This makes it impossible to have the field separator or a linebreak inside a field since no escaping is supported. Plugins can circumvent this problem to a degree by choosing a field separator that is unlikely to appear inside fields, or by preprocessing the output. The former will, in many cases, not be robust since field values may be user-modifiable. Also, different fields may have different "rare" symbols. The latter (processing the output) is something the agent is not supposed to do and may cause information loss. (Worst case scenario: After processing the output, the item identifier of different items may become the same) We should provide a way for agents to format data in such a way that it can be parsed to reliably restore the original data, i.e. by apply real csv parsing with support for quoted fields and escaping.