Make the JSON prefix used in converters configurable

Issue: SPR-10627
This commit is contained in:
Rossen Stoyanchev
2013-07-19 16:52:33 -04:00
parent a4c15d6678
commit d0d670cd7d
4 changed files with 36 additions and 17 deletions

View File

@@ -142,7 +142,7 @@ public class MappingJackson2JsonView extends AbstractView {
* @see #setJsonPrefix
*/
public void setPrefixJson(boolean prefixJson) {
this.jsonPrefix = prefixJson ? "{} && " : "";
this.jsonPrefix = prefixJson ? "{} && " : null;
}
/**

View File

@@ -141,7 +141,7 @@ public class MappingJacksonJsonView extends AbstractView {
* @see #setJsonPrefix
*/
public void setPrefixJson(boolean prefixJson) {
this.jsonPrefix = prefixJson ? "{} && " : "";
this.jsonPrefix = prefixJson ? "{} && " : null;
}
/**