response.setStatus(HttpStatus.BAD_REQUEST.value());
JSONObj obj = IO.error(new JSONObj(), e);
JSONArr errors = obj.putArray("errors");
for (MarkedYAMLException error : e.errors()) {
JSONObj err = errors.addObject()
.put("problem", error.getProblem());
Mark mark = error.getProblemMark();
if (mark != null) {
err.put("line", mark.getLine()).put("column", mark.getColumn());
}