json.addProperty("name", src.getName());
json.add("runnables", context.serialize(src.getRunnables(),
new TypeToken<Map<String, RuntimeSpecification>>() { }.getType()));
json.add("orders", context.serialize(src.getOrders(),
new TypeToken<List<TwillSpecification.Order>>() { }.getType()));
EventHandlerSpecification eventHandler = src.getEventHandler();
if (eventHandler != null) {
json.add("handler", context.serialize(eventHandler, EventHandlerSpecification.class));
}
return json;