Uploaded image for project: 'JBeret'
  1. JBeret
  2. JBERET-160

Add support for registering Jackson modules instead of custom serializers and deserializers

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 1.2.0.Alpha1
    • 1.1.0.Final
    • jberet-support
    • None

      It appears that currently to register support for extra datatypes we must use the 'customDeserializers' and/or 'customSerializers' properties of the JsonItemReader / JsonItemWriter (see http://jberet.gitbooks.io/jberet-user-guide/content/jsonitemreader_and_jsonitemwriter/README.html ).

      So to register a custom deserializer for Joda LocalDate (from https://github.com/FasterXML/jackson-datatype-joda) we need to add "com.fasterxml.jackson.datatype.joda.deser.LocalDateDeserializer" to the customDeserializers property.

      But Jackson allows a simpler mechanism for registering datatypes:

      objectMapper.registerModule(new JodaModule());

      So I suggest that a new property "customDataTypeModules" is added where Jackson SimpleModule sub-classes can be listed, such as com.fasterxml.jackson.datatype.joda.JodaModule.

              cfang@redhat.com Cheng Fang
              andyandy_jira Andreas Häber (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: