mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
added complete tree
This commit is contained in:
@@ -7,13 +7,15 @@ import org.apache.wicket.request.mapper.parameter.PageParameters;
|
||||
import com.commafeed.frontend.CommaFeedSession;
|
||||
import com.commafeed.model.User;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class JSONPage extends WebPage {
|
||||
|
||||
public JSONPage(PageParameters pageParameters) {
|
||||
Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
|
||||
getRequestCycle().scheduleRequestHandlerAfterCurrent(
|
||||
new TextRequestHandler("application/json", "UTF-8", new Gson()
|
||||
new TextRequestHandler("application/json", "UTF-8", gson
|
||||
.toJson(getObject(pageParameters))));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user