public class JCardSerializer extends StdSerializer<VCard> implements ContextualSerializer
JsonSerializer.None
_handledType
Constructor and Description |
---|
JCardSerializer() |
Modifier and Type | Method and Description |
---|---|
JCardSerializer |
createContextual(SerializerProvider prov,
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,
com.fasterxml.jackson.core.JsonGenerator gen,
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
getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId
public JCardSerializer()
public void serialize(VCard value, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider serializers) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
serialize
in class StdSerializer<VCard>
IOException
com.fasterxml.jackson.core.JsonProcessingException
public JCardSerializer createContextual(SerializerProvider prov, BeanProperty property) throws JsonMappingException
createContextual
in interface ContextualSerializer
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–2023 Michael Angstadt. All rights reserved.