You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this is the correct behavior. According to the json specification, newline characters must be escaped.
You can read more about this here. The first comment on the accepted answer states it quite well:
... the JSON spec at [ietf.org/rfc/rfc4627.txt](http://www.ietf.org/rfc/rfc4627.txt) contains this sentence in section 2.5: "All Unicode characters may be placed within the quotation marks except for the characters that must be escaped: quotation mark, reverse solidus, and the control characters (U+0000 through U+001F)." Since a newline is a control character, it must be escaped.
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Component(s)
pkg/stanza
What happened?
Description
if the content contains '\n' ,the parser will report an error
Steps to Reproduce
Expected Result
map[body:a
b]
Actual Result
ReadString: invalid control character found: 10, error found in #9 byte of ...|{"body":"a
b"}|..., bigger context ...|{"body":"a
b"}|...
Collector version
0.61.0
Environment information
Environment
go version go1.18.4 darwin/amd64
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: