Jackson Glossary: BeanSerializerFactory

Role

BeanSerializerFactory is a SerializerFactory that can create dynamic BeanSerializer instances for serializing Java types that have appropriate "getter" methods (or equivalent annotations).

BeanSerializerFactory is designed to be extensible for advanced use cases, although for typical use cases this is not necessary. Additionally much development has focused on making extension possible using explicit extension mechanisms so that sub-classing is not necessary. Nonetheless sometimes sub-classing is still necessary: if so, javadocs should indicate which methods are designed to be overridable, beyond methods of basic SerializerFactory APO.

Usage

BeanSerializerFactory is used like other SerializerFactory types, and is the default SerializerFactory ObjectMapper is constructed with unless instructed otherwise.

It is possible to change the default SerializerFactory by:

   1   objectMapper.setSerializerFactory(new MySerializerFactory());

However, starting with JacksonRelease17 it is usually better to add new serializer providers (implementation of Serializers) instead of creating and using custom SerializerFactory instances.

Extensibility

TO BE WRITTEN!


Back to Jackson Term Glossary


CategoryJackson

BeanSerializerFactory (last edited 2011-01-26 00:20:29 by TatuSaloranta)

Copyright ©2009 FasterXML, LLC