List of usage examples for io.vertx.core.json JsonObject mapFrom
@SuppressWarnings("unchecked") public static JsonObject mapFrom(Object obj)
From source file:org.jberet.vertx.rest.JBeretRouterConfig.java
License:Open Source License
private static void getJobSchedules(final RoutingContext routingContext) { final LocalMap<String, JobSchedule> timerLocalMap = getTimerLocalMap(routingContext.vertx()); final JsonArray jsonArray = new JsonArray(); for (JobSchedule jobSchedule : timerLocalMap.values()) { jsonArray.add(JsonObject.mapFrom(jobSchedule)); }/*from w ww. j ava 2 s . com*/ sendJsonResponse(routingContext, jsonArray.encodePrettily()); }
From source file:org.jberet.vertx.rest.JBeretRouterConfig.java
License:Open Source License
private static void getJobSchedule(final RoutingContext routingContext) { final JobSchedule jobSchedule = lookupJobScheduleWithPathParam(routingContext); final JsonObject jsonObject = JsonObject.mapFrom(jobSchedule); sendJsonResponse(routingContext, jsonObject.encodePrettily()); }