code: @Override
      public void serialize(ConstraintViolationImpl constraintViolation, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
          jsonGenerator.writeStartObject();
          jsonGenerator.writeStringField("message", constraintViolation.getMessage());
          Object invalidValue = constraintViolation.getInvalidValue();
          if (invalidValue != null) {
              jsonGenerator.writeStringField("invalid", invalidValue.toString());
          }
          if (constraintViolation.getPropertyPath() != null) {
              jsonGenerator.writeStringField("path", constraintViolation.getPropertyPath().toString());
          }
          jsonGenerator.writeEndObject();
      }
docs: Writes the JSON form of the Constraint Violation.
  
  @param constraintViolation the violation
  @param jsonGenerator       the generator
  @param serializerProvider  the provider
  @throws IOException if it cannot be serialized