public class JCardSerializer extends com.fasterxml.jackson.databind.ser.std.StdSerializer<VCard> implements com.fasterxml.jackson.databind.ser.ContextualSerializer
Constructor and Description |
---|
JCardSerializer() |
Modifier and Type | Method and Description |
---|---|
JCardSerializer |
createContextual(com.fasterxml.jackson.databind.SerializerProvider prov,
com.fasterxml.jackson.databind.BeanProperty property) |
ScribeIndex |
getScribeIndex()
Gets the scribe index.
|
boolean |
isAddProdId()
Gets whether a
ProductId property will be added to the vCard that
marks it as having been generated by this library. |
boolean |
isVersionStrict()
Gets whether properties that do not support jCard will be excluded from
the written vCard.
|
void |
registerScribe(VCardPropertyScribe<? extends VCardProperty> scribe)
Registers a property scribe.
|
void |
serialize(VCard value,
JsonGenerator gen,
com.fasterxml.jackson.databind.SerializerProvider serializers) |
void |
setAddProdId(boolean addProdId)
Sets whether to add a
ProductId property to the vCard that marks
it as having been generated by this library. |
void |
setScribeIndex(ScribeIndex index)
Sets the scribe index.
|
void |
setVersionStrict(boolean versionStrict)
Sets whether properties that do not support jCard will be excluded from
the written vCard.
|
_neitherNull, _nonEmpty, acceptJsonFormatVisitor, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
public JCardSerializer()
public void serialize(VCard value, JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers) throws IOException, JsonProcessingException
serialize
in class com.fasterxml.jackson.databind.ser.std.StdSerializer<VCard>
IOException
JsonProcessingException
public JCardSerializer createContextual(com.fasterxml.jackson.databind.SerializerProvider prov, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException
createContextual
in interface com.fasterxml.jackson.databind.ser.ContextualSerializer
com.fasterxml.jackson.databind.JsonMappingException
public boolean isAddProdId()
ProductId
property will be added to the vCard that
marks it as having been generated by this library.public void setAddProdId(boolean addProdId)
ProductId
property to the vCard that marks
it as having been generated by this library.addProdId
- true to add the property, false not to (defaults to
true)public boolean isVersionStrict()
public void setVersionStrict(boolean versionStrict)
versionStrict
- true to exclude such properties, false not to
(defaults to true)public void registerScribe(VCardPropertyScribe<? extends VCardProperty> scribe)
Registers a property scribe. This is the same as calling:
getScribeIndex().register(scribe)
scribe
- the scribe to registerpublic ScribeIndex getScribeIndex()
public void setScribeIndex(ScribeIndex index)
index
- the scribe indexCopyright © 2012–2020 Michael Angstadt. All rights reserved.