Class DocumentValidationReportJsonWriter

All Implemented Interfaces:
Marshaller<DocumentValidationReport>, Writer<DocumentValidationReport>

@Setup(mode=SINGLETON, priority=2000) public class DocumentValidationReportJsonWriter extends ExtensibleEntityJsonWriter<DocumentValidationReport>
Convert DocumentValidationReport to Json.

This marshaller is enrichable: register class implementing AbstractJsonEnricher and managing DocumentValidationReport.

This marshaller is also extensible: extend it and simply override ExtensibleEntityJsonWriter.extend(Object, JsonGenerator).

Format is:

 {
   "entity-type":"validation_report",
   "has_error": true|false,
   "number": 123, <- number of errors present in this report
   "violations": [
     {
       "message": "TheErrorMessage",
       "invalid_value": null|"THE_INVALID_VALUE_AS_STRING",
       "constraint": {
         see ConstraintJsonWriter format
       }
     },
     ...
   ]
             <-- contextParameters if there are enrichers activated
             <-- additional property provided by extend() method
 }
 
Since:
7.2