Skip to content

Commit

Permalink
Add missing pieces wrt FasterXML#3647 after forward-merge 2.16 into…
Browse files Browse the repository at this point in the history
… `master`
  • Loading branch information
JooHyukKim committed Oct 1, 2023
1 parent 89c11a8 commit 808610c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public class JsonValueSerializer
*/
protected final boolean _forceTypeInformation;

/**
* Names of properties to ignore from Value class accessed using accessor.
*/
protected final Set<String> _ignoredProperties;

/*
Expand All @@ -68,7 +71,7 @@ public class JsonValueSerializer
* @param ser Explicit serializer to use, if caller knows it (which
* occurs if and only if the "value method" was annotated with
* {@link tools.jackson.databind.annotation.JsonSerialize#using}), otherwise
* null
* {@code null}
*/
protected JsonValueSerializer(JavaType nominalType,
JavaType valueType, boolean staticTyping,
Expand Down Expand Up @@ -173,6 +176,9 @@ public ValueSerializer<?> createContextual(SerializerProvider ctxt,
*/
// I _think_ this can be considered a primary property...
ser = ctxt.findPrimaryPropertySerializer(_valueType, property);
// [databind#3647] : Support @JsonIgnoreProperties to work with @JsonValue
ser = _withIgnoreProperties(ctxt, _accessor, ser);

/* 09-Dec-2010, tatu: Turns out we must add special handling for
* cases where "native" (aka "natural") type is being serialized,
* using standard serializer
Expand Down

0 comments on commit 808610c

Please sign in to comment.