Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
spring-projects-issues opened this issue Nov 11, 2016 · 2 comments
Closed

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

spring-projects-issues opened this issue Nov 11, 2016 · 2 comments
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Nov 11, 2016

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:

  • #19617 Spring MVC 4.3.5's Jackson auto-configuration breaks against Jackson 2.3.3 on the classpath

Referenced from: commits 5700d65, 2735cba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.