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 asList
<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 Modifier and Type Field Description static String
DEFAULT_SCHEMA_NAME
static String
FALLBACK_RESOLVER
-
Fields inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonReader
ctx, registry
-
-
Constructor Summary
Constructors Constructor Description DocumentPropertiesJsonReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Property>
read(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 Detail
-
DEFAULT_SCHEMA_NAME
public static final String DEFAULT_SCHEMA_NAME
- See Also:
- Constant Field Values
-
FALLBACK_RESOLVER
public static final String FALLBACK_RESOLVER
- Since:
- 11.2
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DocumentPropertiesJsonReader
public DocumentPropertiesJsonReader()
-
-
Method Detail
-
read
public List<Property> read(com.fasterxml.jackson.databind.JsonNode jn) throws IOException
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
-
-