From a00980c61ff832bb51849ea0ca9777fb10e89970 Mon Sep 17 00:00:00 2001 From: Robin Bygrave Date: Sun, 19 Jul 2015 21:38:27 +1200 Subject: [PATCH] #329 - JSON - Remove @Deprecated from JsonWriteOptions ... to support ObjectMapper which can be used for serialize/deserialize of @Transient properties --- .../ebean/text/json/JsonWriteOptions.java | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/avaje/ebean/text/json/JsonWriteOptions.java b/src/main/java/com/avaje/ebean/text/json/JsonWriteOptions.java index 3929ba9d4..5956ade30 100644 --- a/src/main/java/com/avaje/ebean/text/json/JsonWriteOptions.java +++ b/src/main/java/com/avaje/ebean/text/json/JsonWriteOptions.java @@ -3,19 +3,18 @@ package com.avaje.ebean.text.json; import com.avaje.ebean.text.PathProperties; /** - * Deprecated in favour of just using PathProperties. - * * 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. *

- * @deprecated */ public class JsonWriteOptions { protected PathProperties pathProperties; + protected Object objectMapper; + /** * 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 @@ -51,4 +50,21 @@ public class JsonWriteOptions { return pathProperties; } + /** + * Return the jackson object mapper to use. + *

+ * If null the ObjectMapper from serverConfig will be used. + */ + public Object getObjectMapper() { + return objectMapper; + } + + /** + * Set the jackson object mapper to use. + *

+ * If null the ObjectMapper from serverConfig will be used. + */ + public void setObjectMapper(Object objectMapper) { + this.objectMapper = objectMapper; + } }