public class JacksonJsonNodeAssistant extends Object implements JsonNodeAssistant<com.fasterxml.jackson.databind.JsonNode>
| 限定符和类型 | 字段和说明 |
|---|---|
protected com.fasterxml.jackson.databind.PropertyNamingStrategy |
namingStrategy |
| 构造器和说明 |
|---|
JacksonJsonNodeAssistant(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
com.fasterxml.jackson.databind.JsonNode |
convertTargetToJsonNode(Object target)
Convert the specified target to json node.
|
String |
determinePropertyName(String propertyName)
Determine the property name when reading or writing for json node.
|
protected com.fasterxml.jackson.databind.PropertyNamingStrategy namingStrategy
public JacksonJsonNodeAssistant(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
objectMapper - object mapperpublic String determinePropertyName(String propertyName)
Determine the property name when reading or writing for json node.
Sometimes, the property name is not the same as the field name, such as the field name is "userName", but the property name is "user_name" in json node, we can override this method to determine the property name.
determinePropertyName 在接口中 JsonNodeAssistant<com.fasterxml.jackson.databind.JsonNode>propertyName - property namepublic com.fasterxml.jackson.databind.JsonNode convertTargetToJsonNode(Object target)
convertTargetToJsonNode 在接口中 JsonNodeAssistant<com.fasterxml.jackson.databind.JsonNode>target - targetCopyright © 2024. All rights reserved.