Interface JacksonCompat.ObjectMapperAccessor
- Enclosing class:
JacksonCompat
public static interface JacksonCompat.ObjectMapperAccessor
Accessor for
ObjectMapper that provides methods to serialize and
deserialize JSON.- Since:
- 4.0
- Author:
- Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptioncreate()Create an accessor using the default mapper configuration of the active strategy.<I> Ideserialize(Object json, Class<I> type) Deserialize JSON content to the requested target type.from(VaultOperations vaultOperations) Create an accessor from the givenVaultOperationscontext.writeValueAsString(Object object) Serialize the given object to its JSON string representation.
-
Method Details
-
create
Create an accessor using the default mapper configuration of the active strategy.- Returns:
- a default
JacksonCompat.ObjectMapperAccessor.
-
from
Create an accessor from the givenVaultOperationscontext.If a
RestTemplatewith a compatible Jackson converter is available, that converter's mapper is used. Otherwise, this method falls back tocreate().- Parameters:
vaultOperations- the operations used to access the current Vault session.- Returns:
- an
JacksonCompat.ObjectMapperAccessorfor the current session context.
-
deserialize
-
writeValueAsString
-