You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/antora/modules/ROOT/pages/representations.adoc
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,15 +30,17 @@ public class MyEntity {
30
30
31
31
In a default configuration, Jackson has no idea what class to instantiate when POSTing new data to the exporter. This is something you need to tell Jackson either through an annotation, or (more cleanly) by registering a type mapping by using a `Module`.
32
32
33
-
To add your own Jackson configuration to the `ObjectMapper` used by Spring Data REST, override the `configureJacksonObjectMapper` method. That method is passed an `ObjectMapper` instance that has a special module to handle serializing and deserializing `PersistentEntity` objects. You can register your own modules as well, as the following example shows:
33
+
To add your own Jackson configuration to the `ObjectMapper` used by Spring Data REST, override the `configureJacksonObjectMapper` method.
34
+
That method is passed an `MapperBuilder` instance that has a special module to handle serializing and deserializing `PersistentEntity` objects.
35
+
You can register your own modules as well, as the following example shows:
Once you have access to the `SetupContext` object in your `Module`, you can do all sorts of cool things to configure Jackson's JSON mapping. You can read more about how `Module` instances work on https://wiki.fasterxml.com/JacksonFeatureModules[Jackson's wiki].
56
+
Once you have access to the `SetupContext` object in your `Module`, you can do all sorts of cool things to configure Jackson's JSON mapping.
57
+
You can read more about how `Module` instances work on https://github.com/FasterXML/jackson-databind/wiki/JacksonFeatures[Jackson's wiki].
0 commit comments