Class DocumentPropertiesJsonReader
java.lang.Object
org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonReader<List<Property>>
org.nuxeo.ecm.core.io.marshallers.json.document.DocumentPropertiesJsonReader
@Setup(mode=SINGLETON,
priority=2000)
public class DocumentPropertiesJsonReader
extends AbstractJsonReader<List<Property>>
Convert Json as
List
<Property
>.
Format is:
{ "schema1Prefix:stringProperty": "stringPropertyValue", <-- each property may be marshall as object if a resolver is associated with that property and if a marshaller exists for the object, in this case, the resulting property will have the corresponding reference value. "schema1Prefix:booleanProperty": true|false, "schema2Prefix:integerProperty": 123, ... "schema3Prefix:complexProperty": { "subProperty": ..., ... }, "schema4Prefix:listProperty": [ ... ] }
- Since:
- 7.2
-
Field Summary
Fields inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonReader
ctx, registry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionread
(com.fasterxml.jackson.databind.JsonNode jn) Implement this method, read the entity data in the providedJsonNode
and return corresponding java object.protected Property
readProperty
(Property parent, Field field, com.fasterxml.jackson.databind.JsonNode jn) Methods inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonReader
accept, getBooleanField, getLongField, getNode, getStringField, getStringListField, read, readEntity
-
Field Details
-
DEFAULT_SCHEMA_NAME
- See Also:
-
FALLBACK_RESOLVER
- Since:
- 11.2
- See Also:
-
-
Constructor Details
-
DocumentPropertiesJsonReader
public DocumentPropertiesJsonReader()
-
-
Method Details
-
read
Description copied from class:AbstractJsonReader
Implement this method, read the entity data in the providedJsonNode
and return corresponding java object.- Specified by:
read
in classAbstractJsonReader<List<Property>>
- Parameters:
jn
- A ready to useJsonNode
.- Returns:
- The unmarshalled entity.
- Throws:
IOException
-
readProperty
protected Property readProperty(Property parent, Field field, com.fasterxml.jackson.databind.JsonNode jn) throws IOException - Throws:
IOException
-