Skip to content

Commit 808610c

Browse files
committed
Add missing pieces wrt FasterXML#3647 after forward-merge 2.16 into master
1 parent 89c11a8 commit 808610c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/tools/jackson/databind/ser/jackson/JsonValueSerializer.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public class JsonValueSerializer
5656
*/
5757
protected final boolean _forceTypeInformation;
5858

59+
/**
60+
* Names of properties to ignore from Value class accessed using accessor.
61+
*/
5962
protected final Set<String> _ignoredProperties;
6063

6164
/*
@@ -68,7 +71,7 @@ public class JsonValueSerializer
6871
* @param ser Explicit serializer to use, if caller knows it (which
6972
* occurs if and only if the "value method" was annotated with
7073
* {@link tools.jackson.databind.annotation.JsonSerialize#using}), otherwise
71-
* null
74+
* {@code null}
7275
*/
7376
protected JsonValueSerializer(JavaType nominalType,
7477
JavaType valueType, boolean staticTyping,
@@ -173,6 +176,9 @@ public ValueSerializer<?> createContextual(SerializerProvider ctxt,
173176
*/
174177
// I _think_ this can be considered a primary property...
175178
ser = ctxt.findPrimaryPropertySerializer(_valueType, property);
179+
// [databind#3647] : Support @JsonIgnoreProperties to work with @JsonValue
180+
ser = _withIgnoreProperties(ctxt, _accessor, ser);
181+
176182
/* 09-Dec-2010, tatu: Turns out we must add special handling for
177183
* cases where "native" (aka "natural") type is being serialized,
178184
* using standard serializer

0 commit comments

Comments
 (0)