kotlinx.serialization icon indicating copy to clipboard operation
kotlinx.serialization copied to clipboard

Newline '\n' vs '\\n'

Open jmiecz opened this issue 6 months ago • 1 comments

Describe the bug In json, if we get:

{
    "someKey": "some long text \nAnotherline"
}

Everything works as intended but if that '\n' was '\n' it just outputs 'some long text \nAnotherline'

Per RFC 8259, newline should be '\n'

jmiecz avatar May 27 '25 23:05 jmiecz

@jmiecz could you please elaborate a bit more on the problem you're facing? It seems like there's a typo in "... if that '\n' was '\n' it just outputs ...", so it's not clear when behavior does not match your expectations.

fzhinkin avatar May 29 '25 16:05 fzhinkin

Closing because no additional information is provided

sandwwraith avatar Jun 23 '25 14:06 sandwwraith