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

MappingJackson2HttpMessageConverter and MappingJacksonHttpMessageConverter should use configured JSON prefix instead of hardcoded value. [SPR-10817] #15443

Closed
spring-issuemaster opened this issue Aug 7, 2013 · 1 comment
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Aug 7, 2013

Halvard Skogsrud opened SPR-10817 and commented

Thanks for adding the ability to configure a custom JSON prefix in MappingJackson(2)HttpMessageConverter in #15255: https://jira.springsource.org/browse/SPR-10627.

Unfortunately the custom value is not used when writing out the JSON, instead the hardcoded string "{} && " is used.

This line (see GitHub links below) should instead read:

jsonGenerator.writeRaw(jsonPrefix);

Links (to v3.2.4.RELEASE code):

MappingJackson2HttpMessageConverter: https://github.com/SpringSource/spring-framework/blob/v3.2.4.RELEASE/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java#L202

MappingJacksonHttpMessageConverter: https://github.com/SpringSource/spring-framework/blob/v3.2.4.RELEASE/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java#L199


Affects: 3.2.4, 4.0 M2

Reference URL: https://github.com/SpringSource/spring-framework/blob/v3.2.4.RELEASE/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java#L202

Issue Links:

  • #15255 Configurable JSON prefix on MappingJackson2HttpMessageConverter and MappingJacksonHttpMessageConverter
@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Aug 8, 2013

Rossen Stoyanchev commented

Yes, indeed. This should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.