java.lang.Object
io.ebean.text.json.JsonWriteOptions
Provides options for customising the JSON write process.
You can explicitly state which properties to include in the JSON output for the root level and each path.
-
Field Summary
Modifier and TypeFieldDescriptionprotected JsonConfig.Include
protected Object
protected FetchPath
protected Map<String,
JsonWriteBeanVisitor<?>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn the include mode for this request.Return the jackson object mapper to use.Return the properties to include by path.Return the Map of registered JsonWriteBeanVisitor's by path.static JsonWriteOptions
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.setPathVisitor
(String path, JsonWriteBeanVisitor<?> visitor) Register a JsonWriteBeanVisitor for the given path.setRootPathVisitor
(JsonWriteBeanVisitor<?> visitor) Register a JsonWriteBeanVisitor for the root level.
-
Field Details
-
pathProperties
-
objectMapper
-
include
-
visitorMap
-
-
Constructor Details
-
JsonWriteOptions
public JsonWriteOptions()
-
-
Method Details
-
parsePath
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".- See Also:
-
pathProperties
Construct JsonWriteOptions with the given pathProperties. -
setPathProperties
Set the Map of properties to include by path. -
getPathProperties
Return the properties to include by path. -
getInclude
Return the include mode for this request. -
setInclude
Set the include mode for this request. -
setRootPathVisitor
Register a JsonWriteBeanVisitor for the root level. -
setPathVisitor
Register a JsonWriteBeanVisitor for the given path. -
getVisitorMap
Return the Map of registered JsonWriteBeanVisitor's by path. -
getObjectMapper
Return the jackson object mapper to use. If null the ObjectMapper from DatabaseConfig will be used. -
setObjectMapper
Set the jackson object mapper to use. If null the ObjectMapper from DatabaseConfig will be used.
-