From 81f743488660d146d99e06fb475afa65c92a237a Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Mon, 7 Nov 2011 12:34:14 -0500 Subject: [PATCH] INT-2207 Add Documentation for JSON Transformers Show how to create and inject a custom ObjectMapper. --- docs/src/reference/docbook/transformer.xml | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/src/reference/docbook/transformer.xml b/docs/src/reference/docbook/transformer.xml index 83d31ea3e5..4f6aa77a2d 100644 --- a/docs/src/reference/docbook/transformer.xml +++ b/docs/src/reference/docbook/transformer.xml @@ -189,6 +189,44 @@ public class Kid { Also, if using the 'ref' attribute, you must point to a 'prototype' scoped bean, otherwise a BeanCreationException will be thrown.  + + JSON Transformers + + + Object to JSON and JSON to Object transformers are provided. + + + ]]> + ]]> + + + These use a vanilla Jackson ObjectMapper by default. If you wish to customize the ObjectMapper (for example, + to configure the 'ALLOW_COMMENTS' feature when parsing JSON), you can supply a reference to your custom ObjectMapper bean using + the object-mapper attribute. + + + ]]> + + + You may wish to consider using a FactoryBean or simple factory method to create the ObjectMapper with + the required characteristics. + + + + + + ]]> +