"{"title":"Title","html":"<div>Text</div><div><br></div>","message":"Message"}"
And i have a java class like : import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;
import org.springframework.web.util.HtmlUtils;
@JsonIgnoreProperties(ignoreUnknown = true)
public class Note {
private String id;
private String title;
@JsonProperty("html")
private String body;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public void parseHtml() {
body = HtmlUtils.htmlEscape(body);
title = HtmlUtils.htmlEscape(title);
}
}
The controller corresponding to this request is :Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.
TRUSTED BY
ASKER
Open in new window