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

setPrefixJson don't work in org.springframework.web.servlet.view.json.MappingJackson2JsonView and org.springframework.web.servlet.view.json.MappingJacksonJsonView [SPR-10752] #15378

Closed
spring-issuemaster opened this issue Jul 17, 2013 · 0 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Jul 17, 2013

Meekado opened SPR-10752 and commented

public void setPrefixJson(boolean prefixJson) {
this.jsonPrefix = "{} && ";
}
suggestion, replace by this : this.jsonPrefix=(prefixJson)?"{} && ":"";

quick workaround :

just add <property name="jsonPrefix" value="" />
and remove <property name="prefixJson" value="false" />

if you don't remove prefixJson, maybe it will set jsonPrefix value...

you can also just remove and set the string but it's more safe to know that is the value :-)


Affects: 3.2.3

Referenced from: commits d8e3ef7, 3bf56dd, ae0f23e, da1fafa, 2af8916

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