public void end(JsonElement json) {
if (json.isArray()) {
JsonArray jsonArray = json.asArray();
setContentType("application/json", "UTF-8");
end(jsonArray.encode());
} else if (json.isObject()) {
JsonObject jsonObject = json.asObject();
setContentType("application/json", "UTF-8");
end(jsonObject.encode());
}