Server

Default JSON Marshallers

Updated: March 18, 2024

Each existing marshaller class has a detailed Javadoc. Please read the corresponding Javadoc to fully understand the generated JSON format and available parameters.

Java-to-JSON Marshallers

DocumentModel

DocumentModel

Java Class Behavior
DocumentModelJsonWriter Writes a document as JSON. It is enrichable and extendable.
properties=*
Loads all document's properties
properties=dublincore,file
Loads only dublincore and file schemas
fetch.document=properties
Loads every properties associated with a resolver
fetch.document=versionLabel
Loads the versioning information
fetch.document=lock
Loads the lock owner and the lock date
ACLJsonEnricher Enriches a document, adding document ACLs. Activated with enrichers.document=acls.
BasePermissionsJsonEnricher Enriches a document, adding user's permissions to the document. Activated with enrichers.document=permissions.
BreadcrumbJsonEnricher Enriches a document, adding the parent's documents. Activated with enrichers.document=breadcrumb.
ChildrenJsonEnricher Enriches a document, adding the children documents. Activated with enrichers.document=children.
ContextualParametersJsonEnricher Enriches a document with free key/value pair. Only from the server side.
String name = "contextualParameters";
Map<String, String> keyValues = ...;
ctx.enrich(name).param(name, keyValues).get();
PreviewJsonEnricher Enriches a document, adding the URL of its preview. Activated with enrichers.document=preview.
ThumbnailJsonEnricher Enriches a document, adding the URL of its thumbnail. Activated with enrichers.document=thumbnail.

List<DocumentModel>

Java Class Behavior
DocumentModelListJsonWriter Writes a list of documents as JSON. Supports paginated lists and provides pagination information. Delegates the document's writing to the Nuxeo Platform.

ACP

Java Class Behavior
ACPJsonWriter Writes a set of access rights as JSON. Enrichable and extendable.

DocumentType

DocumentType

Java Class Behavior
DocumentTypeJsonWriter Writes a document's type as JSON. Enrichable and extendable. Delegates the writing of the type's schemas to the Nuxeo Platform.

List<DocumentType>

Java Class Behavior
DocumentTypeListJsonWriter Writes a list of document types as JSON. Supports paginated lists and provides pagination information. Delegates the type's writing to the Nuxeo Platform.

CompositeType

CompositeType

Java Class Behavior
FacetJsonWriter Writes a document's facet as JSON. Enrichable and extendable. Delegates the writing of the facet's schemas to the Nuxeo Platform.

List<CompositeType>

Java Class Behavior
FacetListJsonWriter Writes a list of facets as JSON. Supports paginated lists and provides pagination information. Delegates the facet's writing to the Nuxeo Platform.

Schema

Schema

Java Class Behavior
SchemaJsonWriter Writes a schema as JSON. It is enrichable and extendable.

List<Schema>

Java Class Behavior
SchemaListJsonWriter Writes a list of schemas as JSON. Supports paginated lists and provides pagination information. Delegates the schema's writing to the Nuxeo Platform.

Constraint

Constraint

Java Class Behavior
ConstraintJsonWriter Writes a validation constraint as JSON. Enrichable and extendable.

List<Constraint>

Java Class Behavior
ConstraintListJsonWriter Writes a list of constraints as JSON. Supports paginated lists and provides pagination information. Delegates the constraint's writing to the Nuxeo Platform.

DocumentValidationReport

Java Class Behavior
DocumentValidationReportJsonWriter Writes a validation report as JSON. Enrichable and extendable. Delegates the constraint's writing to the Nuxeo Platform.

NuxeoPrincipal

NuxeoPrincipal

Java Class Behavior
NuxeoPrincipalJsonWriter Writes a user as JSON. Enrichable and extendable.

List<NuxeoPrincipal>

Java Class Behavior
NuxeoPrincipalListJsonWriter Writes a list of users as JSON. Supports paginated lists and provides pagination information. Delegates the user's writing to the Nuxeo Platform.

NuxeoGroup

NuxeoGroup

Java Class Behavior
NuxeoGroupJsonWriter Writes a group as JSON. It is enrichable and extendable.

List<NuxeoGroup>

Java Class Behavior
NuxeoGroupListJsonWriter Writes a list of groups as JSON. Supports paginated lists and provides pagination information. Delegates the group's writing to the Nuxeo Platform.

DirectoryEntry

DirectoryEntry

Java Class Behavior
DirectoryEntryJsonWriter Writes a directory entry as JSON. Enrichable and extendable.
fetch.directoryEntry=parent
Loads the entry's parent field as the corresponding entry in the same directory. Useful for dc:subjects or dc:coverage values.
translate.directoryEntry=label
Translates the label if it matches an existing l10n key. Useful for dc:nature values.

List<DirectoryEntry>

Java Class Behavior
DirectoryEntryListJsonWriter Writes a list of directory entries as JSON. Supports paginated lists and provides pagination information. Delegates the directory entries writing to the Nuxeo Platform.

LogEntry

LogEntry

Java Class Behavior
LogEntryJsonWriter Writes an audit entry to JSON. Enrichable and extendable.

List<LogEntry>

Java Class Behavior
LogEntryListJsonWriter Writes a list of audit entries to JSON. Enrichable and extendable. Delegates the entries writing to the Nuxeo Platform.

DocumentRoute

Java Class Behavior
DocumentRouteWriter Writes a workflow instance (DocumentRoute) as JSON. Enrichable and extendable.
fetch.workflow=initiator
Resolves the initiator
fetch.workflow=attachedDocumentIds
Resolves the attached document IDs

Task

Java Class Behavior
TaskWriter Writes a task as JSON. Enrichable and extendable.
fetch.task=actors
Resolves the actors.
fetch.task=targetDocumentIds
Resolves the target document Ids

JSON-to-Java Marshallers

DocumentModel

DocumentModel

Java Class Behavior
DocumentModelJsonReader Reads a document from JSON. Supports either reference or JSON object for extended fields value.
If an uid is specified, it will update the existing document with the given properties. The result is a DocumentModelImpl ready to save. Otherwise, you have to specify the name and the type of the document and the result is a SimpleDocumentModel.

List<DocumentModel>

Java Class Behavior
DocumentModelListJsonReader Reads a list of document from JSON. Delegates the document's reading to the Nuxeo Platform.

NuxeoPrincipal

NuxeoPrincipal

Java Class Behavior
NuxeoPrincipalJsonReader Reads a user from JSON.

List<NuxeoPrincipal>

Java Class Behavior
NuxeoPrincipalListJsonReader Reads a list of users from JSON. Delegates the user's reading to the Nuxeo Platform.

NuxeoGroup

NuxeoGroup

Java Class Behavior
NuxeoGroupJsonReader Reads a group from JSON.

List<NuxeoGroup>

Java Class Behavior
NuxeoGroupListJsonReader Reads a list of groups from JSON. Delegates the group's reading to the Nuxeo Platform.

DirectoryEntry

DirectoryEntry

Java Class Behavior
DirectoryEntryJsonReader Reads a directory entry from JSON.

List<DirectoryEntry>

Java Class Behavior
DirectoryEntryListJsonReader Reads a list of directory entries from JSON. Delegates the directory entries reading to the Nuxeo Platform.