如何将使用jxQuery注释构建的java bean转换回JSON字符串?
例如我有数据bean:
import com.googlecode.jxquery.jxQuery;
public class TestBean {
@jxQuery(query = "/client/can_use_day_budget")
private String canUseDayBudget;
@jxQuery(query = "/validEmails/email")
private List<String> emails;
//getters and setters
}
我想从中获取json字符串:
{ "validEmails":[{"email":"email1@gmail.com","select":""},{"email":"email2@gmail.com","select":""}],"client":{"can_use_day_budget":0}}
谢谢。