@Setup(mode=SINGLETON, priority=2000) public class DocumentValidationReportJsonWriter extends ExtensibleEntityJsonWriter<DocumentValidationReport>
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(DocumentValidationReport, JsonWriter).
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 {@link ConstraintJsonWriter} format
}
},
...
]
<-- contextParameters if there are enrichers activated
<-- additional property provided by extend() method
}
| Modifier and Type | Field and Description |
|---|---|
static String |
ENTITY_TYPE |
| Constructor and Description |
|---|
DocumentValidationReportJsonWriter() |
writeaccept, writepublic static final String ENTITY_TYPE
Copyright © 2015 Nuxeo SA. All rights reserved.