@Setup(mode=SINGLETON, priority=2000) public class DocumentPropertyJsonWriter extends AbstractJsonWriter<Property>
Property
to Json.
Format is:
"stringPropertyValue" <-- for string property, each property may be fetched if a resolver is associated with that property and if a parameter fetch.document=propXPath is present, in this case, an object will be marshalled as value or true|false <- for boolean property or 123 <- for int property ... { <- for complex property "subProperty": ..., ... }, [ ... ] <- for list property }
Constructor and Description |
---|
DocumentPropertyJsonWriter() |
Modifier and Type | Method and Description |
---|---|
void |
write(Property prop,
org.codehaus.jackson.JsonGenerator jg)
Implement this method to writes the entity in the provided
JsonGenerator . |
accept, write
public void write(Property prop, org.codehaus.jackson.JsonGenerator jg) throws IOException
AbstractJsonWriter
JsonGenerator
.
This method implementation can use injected properties.
The JsonGenerator
's flushing is done by this abstract class, it's also not not necessary to flush it. Do
not close the provided JsonGenerator
. It may be used is another marshaller calling this one.
write
in class AbstractJsonWriter<Property>
prop
- The entity to marshall as Json.jg
- The JsonGenerator
used to produce Json output.IOException
Copyright © 2015 Nuxeo SA. All rights reserved.