org.codehaus.jackson.map.JsonMappingException: Can not find a deserializer for non-concrete Collection type [collection type; class javafx.collections.ObservableList, contains [simple type, class com.test.model.ChildModel]]
I knew this is more of a Jackson API question. Just want to see if you have a quick solution about this. Since my data model object contains a lot of ObservableList.
Thanks,
Tai
--
You received this message because you are subscribed to the Google Groups "DataFX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datafx-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
JsonConverter jsonConvert = new JsonConverter("jsonCase", CaseTable.class);
@XmlRootElement(name = "jsonCase")public class CaseTable { private final StringProperty caseTitleProp = new SimpleStringProperty(); private long caseID; private String caseTitle;
public CaseTable() { this.caseID = -1; this.caseTitle = ""; caseTitleProp.set(""); } public CaseTable(long caseID, String caseTitle) { this.caseID = caseID; this.caseTitle = caseTitle; caseTitleProp.set(caseTitle); } public String getCaseTitleProp() { return caseTitleProp.get(); }
public void setCaseTitleProp(String value) { caseTitleProp.set(value); }
public StringProperty caseTitlePropProperty() { return caseTitleProp; }
// @JsonProperty("CaseID") @XmlElement(name = "CaseID") public long getCaseID() { return caseID; }
public void setCaseID(long caseID) { this.caseID = caseID; }
// @JsonProperty("CaseTitle") @XmlElement(name = "CaseTitle") public String getCaseTitle() { return caseTitle; }
public void setCaseTitle(String caseTitle) { setCaseTitleProp(caseTitle); this.caseTitle = caseTitle; } }
{"dsJson":{"jsonCase":[{"CaseID":1,"CaseTitle":"Case 1"},{"CaseID":2,"CaseTitle":"Case 2"}]}}
{"jsonCase":[{"CaseID":1,"CaseTitle":"Case 1"},{"CaseID":2,"CaseTitle":"Case 2"}]}