public class JsonWriteOptions extends Object
You can explicitly state which properties to include in the JSON output for the root level and each path.
Constructor and Description |
---|
JsonWriteOptions() |
Modifier and Type | Method and Description |
---|---|
JsonConfig.Include |
getInclude()
Return the include mode for this request.
|
Object |
getObjectMapper()
Return the jackson object mapper to use.
|
FetchPath |
getPathProperties()
Return the properties to include by path.
|
Map<String,JsonWriteBeanVisitor<?>> |
getVisitorMap()
Return the Map of registered JsonWriteBeanVisitor's by path.
|
static JsonWriteOptions |
parsePath(String pathProperties)
Parse and return a PathProperties from nested string format like
(a,b,c(d,e),f(g)) where "c" is a path containing "d" and "e" and "f" is a
path containing "g" and the root path contains "a","b","c" and "f".
|
static JsonWriteOptions |
pathProperties(FetchPath pathProperties)
Construct JsonWriteOptions with the given pathProperties.
|
void |
setInclude(JsonConfig.Include include)
Set the include mode for this request.
|
void |
setObjectMapper(Object objectMapper)
Set the jackson object mapper to use.
|
void |
setPathProperties(FetchPath pathProperties)
Set the Map of properties to include by path.
|
JsonWriteOptions |
setPathVisitor(String path,
JsonWriteBeanVisitor<?> visitor)
Register a JsonWriteBeanVisitor for the given path.
|
JsonWriteOptions |
setRootPathVisitor(JsonWriteBeanVisitor<?> visitor)
Register a JsonWriteBeanVisitor for the root level.
|
public JsonWriteOptions()
public static JsonWriteOptions parsePath(String pathProperties)
PathProperties.parse(String)
public static JsonWriteOptions pathProperties(FetchPath pathProperties)
public void setPathProperties(FetchPath pathProperties)
public FetchPath getPathProperties()
public JsonConfig.Include getInclude()
public void setInclude(JsonConfig.Include include)
public JsonWriteOptions setRootPathVisitor(JsonWriteBeanVisitor<?> visitor)
public JsonWriteOptions setPathVisitor(String path, JsonWriteBeanVisitor<?> visitor)
public Map<String,JsonWriteBeanVisitor<?>> getVisitorMap()
public Object getObjectMapper()
public void setObjectMapper(Object objectMapper)
Copyright © 2019. All rights reserved.