Skip to content

sse breaks with indenting serializer [SPR-14899] #19465

Closed

Description

@spring-projects-issues

Jorg Heymans opened SPR-14899 and commented

in application.properties i have
spring.jackson.serialization.indent_output=true

i then send a normal pojo object:

emitter.send(SseEmitter.event().data(pojo));

The jackson serializer config indents the output, and the result is sent as one dataline which is invalid:

data:{
  "userId" : "myuser",
  "objectId" : "s1"
}

in fact this should be

data: {\n
data: "userId" : "myuser",\n
data: "objectId" : "s1"\n
data: }\n\n

when i remove the indentation on the jackson serializer it's correct:

data: { "userId" : "myuser", "objectId" : "s1" }

Affects: 4.3.3

Issue Links:

Referenced from: commits 5700d65, 2735cba

Activity

  1. spring-projects-issues commented on Nov 30, 2016

    @spring-projects-issues
    CollaboratorAuthor

    Sébastien Deleuze commented

    Pull request submitted.

  2. spring-projects-issues commented on Dec 8, 2016

    @spring-projects-issues
    CollaboratorAuthor

    Sébastien Deleuze commented

    Fixed on master and 4.3.x branches.

  3. added
    type: bug
    in: web
    on Jan 11, 2019
  4. added this to the 4.3.5 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webtype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions