json.prop("layout", dashboard.getColumnLayout());
json.prop("desc", dashboard.getDescription());
json.prop("global", dashboard.getGlobal());
json.prop("shared", dashboard.getShared());
if (dashboard.getUserId() != null) {
UserDto user = dbClient.userDao().getUser(dashboard.getUserId());
if (user != null) {
json.name("owner").beginObject();
// TODO to be shared and extracted from here
json.prop("login", user.getLogin());
json.prop("name", user.getName());
json.endObject();
}
}
// load widgets and related properties
json.name("widgets").beginArray();