5
試圖讓Play 2.0從POJO返回JSON。但我收到錯誤POJO到Play框架中的JSON
The method toJson(Writes<A>) in the type Json is not applicable for the arguments (Product)
而且我的代碼是:
public static Result index(String date) {
Product item = new Product();
return ok(Json.toJson(item));
}
任何想法?
啊現貨。希望文檔更清晰 – KingFu 2013-03-16 18:39:24