public class JsonSerializerBuilder extends WriterSerializerBuilder
psb| Constructor and Description |
|---|
JsonSerializerBuilder()
Constructor, default settings.
|
JsonSerializerBuilder(PropertyStore ps)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
JsonSerializerBuilder |
add(Map<String,Object> properties)
Adds multiple configuration properties on this object.
|
JsonSerializerBuilder |
addBeanTypes()
Configuration property: Add
|
JsonSerializerBuilder |
addBeanTypes(boolean value)
Configuration property: Add
|
JsonSerializerBuilder |
addRootType()
Configuration property: Add type attribute to root nodes.
|
JsonSerializerBuilder |
addRootType(boolean value)
Configuration property: Add type attribute to root nodes.
|
JsonSerializerBuilder |
addTo(String name,
Object value)
Adds a value to a SET or LIST property.
|
JsonSerializerBuilder |
addTo(String name,
String key,
Object value)
Adds or overwrites a value to a SET, LIST, or MAP property.
|
JsonSerializerBuilder |
apply(PropertyStore copyFrom)
Copies the settings from the specified property store into this builder.
|
JsonSerializerBuilder |
applyAnnotations(AnnotationList al,
VarResolverSession vrs)
Applies a set of annotations to this property store.
|
JsonSerializerBuilder |
beanClassVisibility(Visibility value)
Configuration property: Minimum bean class visibility.
|
JsonSerializerBuilder |
beanConstructorVisibility(Visibility value)
Configuration property: Minimum bean constructor visibility.
|
JsonSerializerBuilder |
beanDictionary(Class<?>... values)
Deprecated.
|
JsonSerializerBuilder |
beanDictionary(Object... values)
Deprecated.
|
JsonSerializerBuilder |
beanDictionaryRemove(Class<?>... values)
Deprecated.
|
JsonSerializerBuilder |
beanDictionaryRemove(Object... values)
Deprecated.
|
JsonSerializerBuilder |
beanDictionaryReplace(Class<?>... values)
Deprecated.
|
JsonSerializerBuilder |
beanDictionaryReplace(Object... values)
Deprecated.
|
JsonSerializerBuilder |
beanFieldVisibility(Visibility value)
Configuration property: Minimum bean field visibility.
|
JsonSerializerBuilder |
beanFilters(Class<?>... values)
Configuration property: Bean filters.
|
JsonSerializerBuilder |
beanFilters(Object... values)
Configuration property: Bean filters.
|
JsonSerializerBuilder |
beanFiltersRemove(Class<?>... values)
Configuration property: Bean filters.
|
JsonSerializerBuilder |
beanFiltersRemove(Object... values)
Configuration property: Bean filters.
|
JsonSerializerBuilder |
beanFiltersReplace(Class<?>... values)
Configuration property: Bean filters.
|
JsonSerializerBuilder |
beanFiltersReplace(Object... values)
Configuration property: Bean filters.
|
JsonSerializerBuilder |
beanMapPutReturnsOldValue()
Configuration property: BeanMap.put() returns old property value.
|
JsonSerializerBuilder |
beanMapPutReturnsOldValue(boolean value)
Configuration property: BeanMap.put() returns old property value.
|
JsonSerializerBuilder |
beanMethodVisibility(Visibility value)
Configuration property: Minimum bean method visibility.
|
JsonSerializerBuilder |
beansRequireDefaultConstructor()
Configuration property: Beans require no-arg constructors.
|
JsonSerializerBuilder |
beansRequireDefaultConstructor(boolean value)
Configuration property: Beans require no-arg constructors.
|
JsonSerializerBuilder |
beansRequireSerializable()
Configuration property: Beans require Serializable interface.
|
JsonSerializerBuilder |
beansRequireSerializable(boolean value)
Configuration property: Beans require Serializable interface.
|
JsonSerializerBuilder |
beansRequireSettersForGetters()
Configuration property: Beans require setters for getters.
|
JsonSerializerBuilder |
beansRequireSettersForGetters(boolean value)
Configuration property: Beans require setters for getters.
|
JsonSerializerBuilder |
beansRequireSomeProperties(boolean value)
Configuration property: Beans require at least one property.
|
JsonSerializerBuilder |
beanTypePropertyName(String value)
Configuration property: Bean type property name.
|
JsonSerializerBuilder |
bpi(Class<?> beanClass,
String value)
Configuration property: Bean property includes.
|
JsonSerializerBuilder |
bpi(Map<String,String> values)
Configuration property: Bean property includes.
|
JsonSerializerBuilder |
bpi(String beanClassName,
String value)
Configuration property: Bean property includes.
|
JsonSerializerBuilder |
bpro(Class<?> beanClass,
String value)
Configuration property: Read-only bean properties.
|
JsonSerializerBuilder |
bpro(Map<String,String> values)
Configuration property: Read-only bean properties.
|
JsonSerializerBuilder |
bpro(String beanClassName,
String value)
Configuration property: Read-only bean properties.
|
JsonSerializerBuilder |
bpwo(Class<?> beanClass,
String properties)
Configuration property: Write-only bean properties.
|
JsonSerializerBuilder |
bpwo(Map<String,String> values)
Configuration property: Write-only bean properties.
|
JsonSerializerBuilder |
bpwo(String beanClassName,
String value)
Configuration property: Write-only bean properties.
|
JsonSerializerBuilder |
bpx(Class<?> beanClass,
String properties)
Configuration property: Bean property excludes.
|
JsonSerializerBuilder |
bpx(Map<String,String> values)
Configuration property: Bean property excludes.
|
JsonSerializerBuilder |
bpx(String beanClassName,
String value)
Configuration property: Bean property excludes.
|
JsonSerializer |
build()
Build the object.
|
JsonSerializerBuilder |
debug()
Configuration property: Debug mode.
|
JsonSerializerBuilder |
detectRecursions()
Configuration property: Automatically detect POJO recursions.
|
JsonSerializerBuilder |
detectRecursions(boolean value)
Configuration property: Automatically detect POJO recursions.
|
JsonSerializerBuilder |
dictionary(Class<?>... values)
Configuration property: Bean dictionary.
|
JsonSerializerBuilder |
dictionary(Object... values)
Configuration property: Bean dictionary.
|
JsonSerializerBuilder |
dictionaryRemove(Class<?>... values)
Configuration property: Bean dictionary.
|
JsonSerializerBuilder |
dictionaryRemove(Object... values)
Configuration property: Bean dictionary.
|
JsonSerializerBuilder |
dictionaryReplace(Class<?>... values)
Configuration property: Bean dictionary.
|
JsonSerializerBuilder |
dictionaryReplace(Object... values)
Configuration property: Bean dictionary.
|
JsonSerializerBuilder |
escapeSolidus()
Configuration property: Prefix solidus
|
JsonSerializerBuilder |
escapeSolidus(boolean value)
Configuration property: Prefix solidus
|
<T> JsonSerializerBuilder |
example(Class<T> c,
T o)
Configuration property: POJO example.
|
<T> JsonSerializerBuilder |
exampleJson(Class<T> c,
String value)
Configuration property: POJO example.
|
JsonSerializerBuilder |
fileCharset(Charset value)
Configuration property: File charset.
|
JsonSerializerBuilder |
ignoreInvocationExceptionsOnGetters()
Configuration property: Ignore invocation errors on getters.
|
JsonSerializerBuilder |
ignoreInvocationExceptionsOnGetters(boolean value)
Configuration property: Ignore invocation errors on getters.
|
JsonSerializerBuilder |
ignoreInvocationExceptionsOnSetters()
Configuration property: Ignore invocation errors on setters.
|
JsonSerializerBuilder |
ignoreInvocationExceptionsOnSetters(boolean value)
Configuration property: Ignore invocation errors on setters.
|
JsonSerializerBuilder |
ignorePropertiesWithoutSetters(boolean value)
Configuration property: Ignore properties without setters.
|
JsonSerializerBuilder |
ignoreRecursions()
Configuration property: Ignore recursion errors.
|
JsonSerializerBuilder |
ignoreRecursions(boolean value)
Configuration property: Ignore recursion errors.
|
JsonSerializerBuilder |
ignoreUnknownBeanProperties()
Configuration property: Ignore unknown properties.
|
JsonSerializerBuilder |
ignoreUnknownBeanProperties(boolean value)
Configuration property: Ignore unknown properties.
|
JsonSerializerBuilder |
ignoreUnknownNullBeanProperties(boolean value)
Configuration property: Ignore unknown properties with null values.
|
JsonSerializerBuilder |
implClass(Class<?> interfaceClass,
Class<?> implClass)
Configuration property: Implementation classes.
|
JsonSerializerBuilder |
implClasses(Map<String,Class<?>> values)
Configuration property: Implementation classes.
|
JsonSerializerBuilder |
initialDepth(int value)
Configuration property: Initial depth.
|
JsonSerializerBuilder |
listener(Class<? extends SerializerListener> value)
Configuration property: Serializer listener.
|
JsonSerializerBuilder |
locale(Locale value)
Configuration property: Locale.
|
JsonSerializerBuilder |
maxDepth(int value)
Configuration property: Max traversal depth.
|
JsonSerializerBuilder |
maxIndent(int value)
Configuration property: Maximum indentation.
|
JsonSerializerBuilder |
mediaType(MediaType value)
Configuration property: Media type.
|
JsonSerializerBuilder |
notBeanClasses(Class<?>... values)
Configuration property: Bean class exclusions.
|
JsonSerializerBuilder |
notBeanClasses(Object... values)
Configuration property: Bean class exclusions.
|
JsonSerializerBuilder |
notBeanClassesRemove(Class<?>... values)
Configuration property: Bean class exclusions.
|
JsonSerializerBuilder |
notBeanClassesRemove(Object... values)
Configuration property: Bean class exclusions.
|
JsonSerializerBuilder |
notBeanClassesReplace(Class<?>... values)
Configuration property: Bean class exclusions.
|
JsonSerializerBuilder |
notBeanClassesReplace(Object... values)
Configuration property: Bean class exclusions.
|
JsonSerializerBuilder |
notBeanPackages(Object... values)
Configuration property: Bean package exclusions.
|
JsonSerializerBuilder |
notBeanPackages(String... values)
Configuration property: Bean package exclusions.
|
JsonSerializerBuilder |
notBeanPackagesRemove(Object... values)
Configuration property: Bean package exclusions.
|
JsonSerializerBuilder |
notBeanPackagesRemove(String... values)
Configuration property: Bean package exclusions.
|
JsonSerializerBuilder |
notBeanPackagesReplace(Object... values)
Configuration property: Bean package exclusions.
|
JsonSerializerBuilder |
notBeanPackagesReplace(String... values)
Configuration property: Bean package exclusions.
|
JsonSerializerBuilder |
pojoSwaps(Class<?>... values)
Configuration property: POJO swaps.
|
JsonSerializerBuilder |
pojoSwaps(Object... values)
Configuration property: POJO swaps.
|
JsonSerializerBuilder |
pojoSwapsRemove(Class<?>... values)
Configuration property: POJO swaps.
|
JsonSerializerBuilder |
pojoSwapsRemove(Object... values)
Configuration property: POJO swaps.
|
JsonSerializerBuilder |
pojoSwapsReplace(Class<?>... values)
Configuration property: POJO swaps.
|
JsonSerializerBuilder |
pojoSwapsReplace(Object... values)
Configuration property: POJO swaps.
|
JsonSerializerBuilder |
quoteChar(char value)
Configuration property: Quote character.
|
JsonSerializerBuilder |
removeFrom(String name,
Object value)
Removes a value from a SET, LIST, or MAP property.
|
JsonSerializerBuilder |
set(Map<String,Object> properties)
Sets multiple configuration properties on this object.
|
JsonSerializerBuilder |
set(String name,
Object value)
Sets a configuration property on this object.
|
JsonSerializerBuilder |
simple()
Configuration property: Simple JSON mode.
|
JsonSerializerBuilder |
simple(boolean value)
Configuration property: Simple JSON mode.
|
JsonSerializerBuilder |
sortCollections()
Configuration property: Sort arrays and collections alphabetically.
|
JsonSerializerBuilder |
sortCollections(boolean value)
Configuration property: Sort arrays and collections alphabetically.
|
JsonSerializerBuilder |
sortMaps()
Configuration property: Sort maps alphabetically.
|
JsonSerializerBuilder |
sortMaps(boolean value)
Configuration property: Sort maps alphabetically.
|
JsonSerializerBuilder |
sortProperties()
Configuration property: Sort bean properties.
|
JsonSerializerBuilder |
sortProperties(boolean value)
Configuration property: Sort bean properties.
|
JsonSerializerBuilder |
sq()
Configuration property: Quote character.
|
JsonSerializerBuilder |
ssq()
Configuration property: Simple JSON mode and single quote.
|
JsonSerializerBuilder |
streamCharset(Charset value)
Configuration property: Output stream charset.
|
JsonSerializerBuilder |
timeZone(TimeZone value)
Configuration property: TimeZone.
|
JsonSerializerBuilder |
trimEmptyCollections()
Configuration property: Trim empty lists and arrays.
|
JsonSerializerBuilder |
trimEmptyCollections(boolean value)
Configuration property: Trim empty lists and arrays.
|
JsonSerializerBuilder |
trimEmptyMaps()
Configuration property: Trim empty maps.
|
JsonSerializerBuilder |
trimEmptyMaps(boolean value)
Configuration property: Trim empty maps.
|
JsonSerializerBuilder |
trimNullProperties(boolean value)
Configuration property: Trim null bean property values.
|
JsonSerializerBuilder |
trimStrings()
Configuration property: Trim strings.
|
JsonSerializerBuilder |
trimStrings(boolean value)
Configuration property: Trim strings.
|
JsonSerializerBuilder |
uriContext(UriContext value)
Configuration property: URI context bean.
|
JsonSerializerBuilder |
uriRelativity(UriRelativity value)
Configuration property: URI relativity.
|
JsonSerializerBuilder |
uriResolution(UriResolution value)
Configuration property: URI resolution.
|
JsonSerializerBuilder |
useEnumNames()
Configuration property: Use enum names.
|
JsonSerializerBuilder |
useEnumNames(boolean value)
Configuration property: Use enum names.
|
JsonSerializerBuilder |
useInterfaceProxies(boolean value)
Configuration property: Use interface proxies.
|
JsonSerializerBuilder |
useJavaBeanIntrospector()
Configuration property: Use Java Introspector.
|
JsonSerializerBuilder |
useJavaBeanIntrospector(boolean value)
Configuration property: Use Java Introspector.
|
JsonSerializerBuilder |
useWhitespace()
Configuration property: Use whitespace.
|
JsonSerializerBuilder |
useWhitespace(boolean value)
Configuration property: Use whitespace.
|
JsonSerializerBuilder |
ws()
Configuration property: Use whitespace.
|
applyAnnotations, applyAnnotationsuriContext, uriRelativity, uriResolutiondebug, examples, excludeProperties, excludeProperties, excludeProperties, fluentSetters, fluentSetters, includeProperties, includeProperties, includeProperties, propertyNamerbuild, getPropertyStore, getPropertyStoreBuilder, peek, peekpublic JsonSerializerBuilder()
public JsonSerializerBuilder(PropertyStore ps)
ps - The initial configuration settings for this builder.public JsonSerializer build()
ContextBuilderbuild in class WriterSerializerBuilderpublic JsonSerializerBuilder escapeSolidus(boolean value)
If
value - The new value for this property.
public JsonSerializerBuilder escapeSolidus()
Shortcut for calling escapeSolidus(.
public JsonSerializerBuilder simple(boolean value)
If
Otherwise, they are always quoted.
value - The new value for this property.
public JsonSerializerBuilder simple()
Shortcut for calling simple(.
public JsonSerializerBuilder ssq()
Shortcut for calling
public JsonSerializerBuilder fileCharset(Charset value)
WriterSerializerBuilderThe character set to use for writing Files to the file system.
Used when passing in files to Serializer.serialize(Object, Object).
fileCharset in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder maxIndent(int value)
WriterSerializerBuilderSpecifies the maximum indentation level in the serialized document.
maxIndent in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder quoteChar(char value)
WriterSerializerBuilderThis is the character used for quoting attributes and values.
quoteChar in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder sq()
WriterSerializerBuilder
Shortcut for calling quoteChar(.
sq in class WriterSerializerBuilderpublic JsonSerializerBuilder streamCharset(Charset value)
WriterSerializerBuilderThe character set to use when writing to OutputStreams.
Used when passing in output streams and byte arrays to Serializer.serialize(Object, Object).
streamCharset in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder useWhitespace(boolean value)
WriterSerializerBuilder
If
useWhitespace in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder useWhitespace()
WriterSerializerBuilder
Shortcut for calling useWhitespace(.
useWhitespace in class WriterSerializerBuilderpublic JsonSerializerBuilder ws()
WriterSerializerBuilder
Shortcut for calling useWhitespace(.
ws in class WriterSerializerBuilderpublic JsonSerializerBuilder addBeanTypes(boolean value)
SerializerBuilder
If
addBeanTypes in class SerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder addBeanTypes()
SerializerBuilder
Shortcut for calling addBeanTypes(.
addBeanTypes in class SerializerBuilderpublic JsonSerializerBuilder addRootType(boolean value)
SerializerBuilderWhen disabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level type information that might normally be included to determine the data type will not be serialized.
addRootType in class SerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder addRootType()
SerializerBuilder
Shortcut for calling addRootType(.
addRootType in class SerializerBuilderpublic JsonSerializerBuilder detectRecursions(boolean value)
BeanTraverseBuilderSpecifies that recursions should be checked for during traversal.
detectRecursions in class SerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder detectRecursions()
BeanTraverseBuilder
Shortcut for calling detectRecursions(.
detectRecursions in class SerializerBuilderpublic JsonSerializerBuilder ignoreRecursions(boolean value)
BeanTraverseBuilder
If
ignoreRecursions in class SerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder ignoreRecursions()
BeanTraverseBuilder
Shortcut for calling ignoreRecursions(.
ignoreRecursions in class SerializerBuilderpublic JsonSerializerBuilder initialDepth(int value)
BeanTraverseBuilderThe initial indentation level at the root.
initialDepth in class SerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder listener(Class<? extends SerializerListener> value)
SerializerBuilderClass used to listen for errors and warnings that occur during serialization.
listener in class SerializerBuildervalue - The new value for this property.public JsonSerializerBuilder maxDepth(int value)
BeanTraverseBuilder
Abort traversal if specified depth is reached in the POJO tree.
If this depth is exceeded, an exception is thrown.
This prevents stack overflows from occurring when trying to traverse models with recursive references.
maxDepth in class SerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder sortCollections(boolean value)
SerializerBuilderCopies and sorts the contents of arrays and collections before serializing them.
sortCollections in class SerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder sortCollections()
SerializerBuilder
Shortcut for calling sortCollections(.
sortCollections in class SerializerBuilderpublic JsonSerializerBuilder sortMaps(boolean value)
SerializerBuilderCopies and sorts the contents of maps before serializing them.
sortMaps in class SerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder sortMaps()
SerializerBuilder
Shortcut for calling sortMaps(.
sortMaps in class SerializerBuilderpublic JsonSerializerBuilder trimEmptyCollections(boolean value)
SerializerBuilder
If
trimEmptyCollections in class SerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder trimEmptyCollections()
SerializerBuilder
Shortcut for calling trimEmptyCollections(.
trimEmptyCollections in class SerializerBuilderpublic JsonSerializerBuilder trimEmptyMaps(boolean value)
SerializerBuilder
If
trimEmptyMaps in class SerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder trimEmptyMaps()
SerializerBuilder
Shortcut for calling trimEmptyMaps(.
trimEmptyMaps in class SerializerBuilderpublic JsonSerializerBuilder trimNullProperties(boolean value)
SerializerBuilder
If
trimNullProperties in class SerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder trimStrings(boolean value)
SerializerBuilder
If String.trim() before being serialized.
trimStrings in class SerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder trimStrings()
SerializerBuilder
Shortcut for calling trimStrings(.
trimStrings in class SerializerBuilderpublic JsonSerializerBuilder uriContext(UriContext value)
SerializerBuilderBean used for resolution of URIs to absolute or root-relative form.
uriContext in class SerializerBuildervalue - The new value for this property.public JsonSerializerBuilder uriRelativity(UriRelativity value)
SerializerBuilderDefines what relative URIs are relative to when serializing URI/URL objects.
uriRelativity in class SerializerBuildervalue - The new value for this property.
UriRelativity.RESOURCEpublic JsonSerializerBuilder uriResolution(UriResolution value)
SerializerBuilderDefines the resolution level for URIs when serializing URI/URL objects.
uriResolution in class SerializerBuildervalue - The new value for this property.
UriResolution.NONEpublic JsonSerializerBuilder beanClassVisibility(Visibility value)
BeanContextBuilderClasses are not considered beans unless they meet the minimum visibility requirements.
For example, if the visibility is
beanClassVisibility in class WriterSerializerBuildervalue - The new value for this property.
Visibility.PUBLIC.public JsonSerializerBuilder beanConstructorVisibility(Visibility value)
BeanContextBuilderOnly look for constructors with the specified minimum visibility.
beanConstructorVisibility in class WriterSerializerBuildervalue - The new value for this property.
Visibility.PUBLIC.@Deprecated public JsonSerializerBuilder beanDictionary(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...) but takes in an array of classes.
beanDictionary in class WriterSerializerBuildervalues - The values to add to this property.@Deprecated public JsonSerializerBuilder beanDictionary(Object... values)
BeanContextBuilderAdds to the list of classes that make up the bean dictionary in this bean context.
beanDictionary in class WriterSerializerBuildervalues - The values to add to this property.@Deprecated public JsonSerializerBuilder beanDictionaryReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...) but replaces the existing value.
beanDictionaryReplace in class WriterSerializerBuildervalues - The new values for this property.@Deprecated public JsonSerializerBuilder beanDictionaryReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...) but replaces the existing value.
beanDictionaryReplace in class WriterSerializerBuildervalues - The new values for this property.@Deprecated public JsonSerializerBuilder beanDictionaryRemove(Class<?>... values)
BeanContextBuilderRemoves from the list of classes that make up the bean dictionary in this bean context.
beanDictionaryRemove in class WriterSerializerBuildervalues - The values to remove from this property.@Deprecated public JsonSerializerBuilder beanDictionaryRemove(Object... values)
BeanContextBuilderRemoves from the list of classes that make up the bean dictionary in this bean context.
beanDictionaryRemove in class WriterSerializerBuildervalues - The values to remove from this property.public JsonSerializerBuilder beanFieldVisibility(Visibility value)
BeanContextBuilderOnly look for bean fields with the specified minimum visibility.
beanFieldVisibility in class WriterSerializerBuildervalue - The new value for this property.
Visibility.PUBLIC.public JsonSerializerBuilder beanFilters(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...) but takes in an array of classes.
beanFilters in class WriterSerializerBuildervalues - The values to add to this property.public JsonSerializerBuilder beanFilters(Object... values)
BeanContextBuilder
This is a programmatic equivalent to the @Bean annotation.
It's useful when you want to use the Bean annotation functionality, but you don't have the ability to alter
the bean classes.
beanFilters in class WriterSerializerBuildervalues - The values to add to this property.
@Bean(typeName).
BeanDictionaryList containing a collection of bean classes with type name annotations.
BeanDictionaryMap containing a mapping of type names to classes without type name annotations.
public JsonSerializerBuilder beanFiltersReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...) but replaces the existing values.
beanFiltersReplace in class WriterSerializerBuildervalues - The new values for this property.
@Bean(typeName).
BeanDictionaryList containing a collection of bean classes with type name annotations.
BeanDictionaryMap containing a mapping of type names to classes without type name annotations.
public JsonSerializerBuilder beanFiltersReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...) but replaces the existing values.
beanFiltersReplace in class WriterSerializerBuildervalues - The new values for this property.
@Bean(typeName).
BeanDictionaryList containing a collection of bean classes with type name annotations.
BeanDictionaryMap containing a mapping of type names to classes without type name annotations.
public JsonSerializerBuilder beanFiltersRemove(Class<?>... values)
BeanContextBuilderRemoves from the list of classes that make up the bean filters in this bean context.
beanFiltersRemove in class WriterSerializerBuildervalues - The values to remove from this property.
@Bean(typeName).
BeanDictionaryList containing a collection of bean classes with type name annotations.
BeanDictionaryMap containing a mapping of type names to classes without type name annotations.
public JsonSerializerBuilder beanFiltersRemove(Object... values)
BeanContextBuilderRemoves from the list of classes that make up the bean filters in this bean context.
beanFiltersRemove in class WriterSerializerBuildervalues - The values to remove from this property.
@Bean(typeName).
BeanDictionaryList containing a collection of bean classes with type name annotations.
BeanDictionaryMap containing a mapping of type names to classes without type name annotations.
public JsonSerializerBuilder beanMapPutReturnsOldValue(boolean value)
BeanContextBuilder
If BeanMap.put() method will return old property
values.
Otherwise, it returns
beanMapPutReturnsOldValue in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder beanMapPutReturnsOldValue()
BeanContextBuilder
Shortcut for calling beanMapPutReturnsOldValue(.
beanMapPutReturnsOldValue in class WriterSerializerBuilderpublic JsonSerializerBuilder beanMethodVisibility(Visibility value)
BeanContextBuilderOnly look for bean methods with the specified minimum visibility.
beanMethodVisibility in class WriterSerializerBuildervalue - The new value for this property.
Visibility.PUBLICpublic JsonSerializerBuilder beansRequireDefaultConstructor(boolean value)
BeanContextBuilder
If
Otherwise, the bean will be serialized as a string using the Object.toString() method.
beansRequireDefaultConstructor in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder beansRequireDefaultConstructor()
BeanContextBuilder
Shortcut for calling beansRequireDefaultConstructor(.
beansRequireDefaultConstructor in class WriterSerializerBuilderpublic JsonSerializerBuilder beansRequireSerializable(boolean value)
BeanContextBuilder
If Serializable interface to be considered a bean.
Otherwise, the bean will be serialized as a string using the Object.toString() method.
beansRequireSerializable in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder beansRequireSerializable()
BeanContextBuilder
Shortcut for calling beansRequireSerializable(.
beansRequireSerializable in class WriterSerializerBuilderpublic JsonSerializerBuilder beansRequireSettersForGetters(boolean value)
BeanContextBuilder
If
Otherwise, they will be ignored.
beansRequireSettersForGetters in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder beansRequireSettersForGetters()
BeanContextBuilder
Shortcut for calling beansRequireSettersForGetters(.
beansRequireSettersForGetters in class WriterSerializerBuilderpublic JsonSerializerBuilder beansRequireSomeProperties(boolean value)
BeanContextBuilder
If
Otherwise, the bean will be serialized as a string using the Object.toString() method.
beansRequireSomeProperties in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder beanTypePropertyName(String value)
BeanContextBuilderThis specifies the name of the bean property used to store the dictionary name of a bean type so that the parser knows the data type to reconstruct.
beanTypePropertyName in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder bpi(Class<?> beanClass, String value)
BeanContextBuilderSpecifies the set and order of names of properties associated with the bean class.
bpi in class WriterSerializerBuilderbeanClass - The bean class.value - Comma-delimited list of property names.public JsonSerializerBuilder bpi(Map<String,String> values)
BeanContextBuilderSpecifies the set and order of names of properties associated with the bean class.
bpi in class WriterSerializerBuildervalues - The new value for this property.public JsonSerializerBuilder bpi(String beanClassName, String value)
BeanContextBuilderSpecifies the set and order of names of properties associated with the bean class.
bpi in class WriterSerializerBuilderbeanClassName - The bean class name.
value - Comma-delimited list of property names.public JsonSerializerBuilder bpx(Class<?> beanClass, String properties)
BeanContextBuilderSpecifies to exclude the specified list of properties for the specified bean class.
bpx in class WriterSerializerBuilderbeanClass - The bean class.properties - Comma-delimited list of property names.public JsonSerializerBuilder bpx(Map<String,String> values)
BeanContextBuilderSpecifies to exclude the specified list of properties for the specified bean classes.
bpx in class WriterSerializerBuildervalues - The new value for this property.public JsonSerializerBuilder bpx(String beanClassName, String value)
BeanContextBuilderbpx in class WriterSerializerBuilderbeanClassName - The bean class name.
value - Comma-delimited list of property names.public JsonSerializerBuilder bpro(Class<?> beanClass, String value)
BeanContextBuilderSpecifies the read-only properties for the specified bean class.
bpro in class WriterSerializerBuilderbeanClass - The bean class.value - Comma-delimited list of property names.public JsonSerializerBuilder bpro(Map<String,String> values)
BeanContextBuilderSpecifies the read-only properties for the specified bean classes.
bpro in class WriterSerializerBuildervalues - The new value for this property.public JsonSerializerBuilder bpro(String beanClassName, String value)
BeanContextBuilderSpecifies the read-only properties for the specified bean class.
bpro in class WriterSerializerBuilderbeanClassName - The bean class name.
value - Comma-delimited list of property names.public JsonSerializerBuilder bpwo(Class<?> beanClass, String properties)
BeanContextBuilderSpecifies the write-only properties for the specified bean class.
bpwo in class WriterSerializerBuilderbeanClass - The bean class.properties - Comma-delimited list of property names.public JsonSerializerBuilder bpwo(Map<String,String> values)
BeanContextBuilderSpecifies the write-only properties for the specified bean classes.
bpwo in class WriterSerializerBuildervalues - The new value for this property.public JsonSerializerBuilder bpwo(String beanClassName, String value)
BeanContextBuilderSpecifies the write-only properties for the specified bean class.
bpwo in class WriterSerializerBuilderbeanClassName - The bean class name.
value - Comma-delimited list of property names.public JsonSerializerBuilder debug()
BeanContextBuilder
Shortcut for calling debug(.
debug in class WriterSerializerBuilderpublic JsonSerializerBuilder dictionary(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...) but takes in an array of classes.
dictionary in class WriterSerializerBuildervalues - The values to add to this property.public JsonSerializerBuilder dictionary(Object... values)
BeanContextBuilderAdds to the list of classes that make up the bean dictionary in this bean context.
dictionary in class WriterSerializerBuildervalues - The values to add to this property.public JsonSerializerBuilder dictionaryReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...) but replaces the existing value.
dictionaryReplace in class WriterSerializerBuildervalues - The new values for this property.public JsonSerializerBuilder dictionaryReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...) but replaces the existing value.
dictionaryReplace in class WriterSerializerBuildervalues - The new values for this property.public JsonSerializerBuilder dictionaryRemove(Class<?>... values)
BeanContextBuilderRemoves from the list of classes that make up the bean dictionary in this bean context.
dictionaryRemove in class WriterSerializerBuildervalues - The values to remove from this property.public JsonSerializerBuilder dictionaryRemove(Object... values)
BeanContextBuilderRemoves from the list of classes that make up the bean dictionary in this bean context.
dictionaryRemove in class WriterSerializerBuildervalues - The values to remove from this property.public <T> JsonSerializerBuilder example(Class<T> c, T o)
BeanContextBuilderSpecifies an example of the specified class.
example in class WriterSerializerBuilderc - The POJO class.o - An instance of the POJO class used for examples.public <T> JsonSerializerBuilder exampleJson(Class<T> c, String value)
BeanContextBuilderSpecifies an example of the specified class.
exampleJson in class WriterSerializerBuilderT - The POJO class type.c - The POJO class.value - The simple JSON representation of the example.public JsonSerializerBuilder ignoreInvocationExceptionsOnGetters(boolean value)
BeanContextBuilder
If BeanRuntimeException is thrown.
ignoreInvocationExceptionsOnGetters in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder ignoreInvocationExceptionsOnGetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnGetters(.
ignoreInvocationExceptionsOnGetters in class WriterSerializerBuilderpublic JsonSerializerBuilder ignoreInvocationExceptionsOnSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException is thrown.
ignoreInvocationExceptionsOnSetters in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder ignoreInvocationExceptionsOnSetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnSetters(.
ignoreInvocationExceptionsOnSetters in class WriterSerializerBuilderpublic JsonSerializerBuilder ignorePropertiesWithoutSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException is thrown.
ignorePropertiesWithoutSetters in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder ignoreUnknownBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException is thrown.
ignoreUnknownBeanProperties in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder ignoreUnknownBeanProperties()
BeanContextBuilder
Shortcut for calling ignoreUnknownBeanProperties(.
ignoreUnknownBeanProperties in class WriterSerializerBuilderpublic JsonSerializerBuilder ignoreUnknownNullBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException is thrown.
ignoreUnknownNullBeanProperties in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder implClass(Class<?> interfaceClass, Class<?> implClass)
BeanContextBuilderimplClass in class WriterSerializerBuilderinterfaceClass - The interface class.implClass - The implementation class.public JsonSerializerBuilder implClasses(Map<String,Class<?>> values)
BeanContextBuilderFor interfaces and abstract classes this method can be used to specify an implementation class for the interface/abstract class so that instances of the implementation class are used when instantiated (e.g. during a parse).
implClasses in class WriterSerializerBuildervalues - The new value for this property.public JsonSerializerBuilder locale(Locale value)
BeanContextBuilderSpecifies a default locale for serializer and parser sessions.
locale in class WriterSerializerBuildervalue - The new value for this property.public JsonSerializerBuilder mediaType(MediaType value)
BeanContextBuilderSpecifies a default media type value for serializer and parser sessions.
mediaType in class WriterSerializerBuildervalue - The new value for this property.public JsonSerializerBuilder notBeanClasses(Class<?>... values)
BeanContextBuilder
List of classes that should not be treated as beans even if they appear to be bean-like.
Not-bean classes are converted to
notBeanClasses in class WriterSerializerBuildervalues - The values to add to this property.public JsonSerializerBuilder notBeanClasses(Object... values)
BeanContextBuilder
List of classes that should not be treated as beans even if they appear to be bean-like.
Not-bean classes are converted to
notBeanClasses in class WriterSerializerBuildervalues - The values to add to this property.
public JsonSerializerBuilder notBeanClassesReplace(Class<?>... values)
BeanContextBuilder
Not-bean classes are converted to
notBeanClassesReplace in class WriterSerializerBuildervalues - The new value for this property.public JsonSerializerBuilder notBeanClassesReplace(Object... values)
BeanContextBuilder
Not-bean classes are converted to
notBeanClassesReplace in class WriterSerializerBuildervalues - The new value for this property.
public JsonSerializerBuilder notBeanClassesRemove(Class<?>... values)
BeanContextBuildernotBeanClassesRemove in class WriterSerializerBuildervalues - The values to remove from this property.public JsonSerializerBuilder notBeanClassesRemove(Object... values)
BeanContextBuildernotBeanClassesRemove in class WriterSerializerBuildervalues - The values to remove from this property.
public JsonSerializerBuilder notBeanPackages(Object... values)
BeanContextBuildernotBeanPackages in class WriterSerializerBuildervalues - The values to add to this property.
public JsonSerializerBuilder notBeanPackages(String... values)
BeanContextBuildernotBeanPackages in class WriterSerializerBuildervalues - The values to add to this property.public JsonSerializerBuilder notBeanPackagesReplace(String... values)
BeanContextBuildernotBeanPackagesReplace in class WriterSerializerBuildervalues - public JsonSerializerBuilder notBeanPackagesReplace(Object... values)
BeanContextBuildernotBeanPackagesReplace in class WriterSerializerBuildervalues - public JsonSerializerBuilder notBeanPackagesRemove(String... values)
BeanContextBuildernotBeanPackagesRemove in class WriterSerializerBuildervalues - The values to remove from this property.public JsonSerializerBuilder notBeanPackagesRemove(Object... values)
BeanContextBuildernotBeanPackagesRemove in class WriterSerializerBuildervalues - public JsonSerializerBuilder pojoSwaps(Class<?>... values)
BeanContextBuilderpojoSwaps in class WriterSerializerBuildervalues - The values to add to this property.public JsonSerializerBuilder pojoSwaps(Object... values)
BeanContextBuilderpojoSwaps in class WriterSerializerBuildervalues - The values to add to this property.
PojoSwap.
SurrogateSwap.
public JsonSerializerBuilder pojoSwapsReplace(Class<?>... values)
BeanContextBuilderpojoSwapsReplace in class WriterSerializerBuildervalues - The values to remove from this property.
PojoSwap.
SurrogateSwap.
public JsonSerializerBuilder pojoSwapsReplace(Object... values)
BeanContextBuilderpojoSwapsReplace in class WriterSerializerBuildervalues - The values to remove from this property.
PojoSwap.
SurrogateSwap.
public JsonSerializerBuilder pojoSwapsRemove(Class<?>... values)
BeanContextBuilderpojoSwapsRemove in class WriterSerializerBuildervalues - The values to remove from this property.
PojoSwap.
SurrogateSwap.
public JsonSerializerBuilder pojoSwapsRemove(Object... values)
BeanContextBuilderpojoSwapsRemove in class WriterSerializerBuildervalues - The values to remove from this property.
PojoSwap.
SurrogateSwap.
public JsonSerializerBuilder sortProperties(boolean value)
BeanContextBuilder
When
sortProperties in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder sortProperties()
BeanContextBuilder
Shortcut for calling sortProperties(.
sortProperties in class WriterSerializerBuilderpublic JsonSerializerBuilder timeZone(TimeZone value)
BeanContextBuildertimeZone in class WriterSerializerBuildervalue - The new value for this property.public JsonSerializerBuilder useEnumNames(boolean value)
BeanContextBuilder
When enabled, enums are always serialized by name instead of using Object.toString().
useEnumNames in class WriterSerializerBuildervalue - The property value.public JsonSerializerBuilder useEnumNames()
BeanContextBuilder
When enabled, enums are always serialized by name instead of using Object.toString().
useEnumNames in class WriterSerializerBuilderpublic JsonSerializerBuilder useInterfaceProxies(boolean value)
BeanContextBuilder
If InvocationHandler if there is no other way of instantiating them.
useInterfaceProxies in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder useJavaBeanIntrospector(boolean value)
BeanContextBuilderUsing the built-in Java bean introspector will not pick up fields or non-standard getters/setters.
@Bean annotations will be ignored if you enable this setting.
useJavaBeanIntrospector in class WriterSerializerBuildervalue - The new value for this property.
public JsonSerializerBuilder useJavaBeanIntrospector()
BeanContextBuilder
Shortcut for calling useJavaBeanIntrospector(.
useJavaBeanIntrospector in class WriterSerializerBuilderpublic JsonSerializerBuilder set(String name, Object value)
ContextBuilderset in class WriterSerializerBuildername - The property name.value - The property value.PropertyStoreBuilder.set(String, Object)public JsonSerializerBuilder set(Map<String,Object> properties)
ContextBuilderset in class WriterSerializerBuilderproperties - The properties to set on this class.PropertyStoreBuilder.set(java.util.Map)public JsonSerializerBuilder add(Map<String,Object> properties)
ContextBuilderadd in class WriterSerializerBuilderproperties - The properties to set on this class.PropertyStoreBuilder.add(java.util.Map)public JsonSerializerBuilder addTo(String name, Object value)
ContextBuilderaddTo in class WriterSerializerBuildername - The property name.value - The new value to add to the SET property.public JsonSerializerBuilder addTo(String name, String key, Object value)
ContextBuilderaddTo in class WriterSerializerBuildername - The property name.key - The property value map key.value - The property value map value.public JsonSerializerBuilder removeFrom(String name, Object value)
ContextBuilderremoveFrom in class WriterSerializerBuildername - The property name.value - The property value in the SET property.public JsonSerializerBuilder apply(PropertyStore copyFrom)
ContextBuilderapply in class WriterSerializerBuildercopyFrom - The factory whose settings are being copied.public JsonSerializerBuilder applyAnnotations(AnnotationList al, VarResolverSession vrs)
ContextBuilderapplyAnnotations in class WriterSerializerBuilderal - The list of all annotations annotated with PropertyStoreApply.vrs - The string resolver for resolving variables in annotation values.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.