@@ -56,6 +56,8 @@ public class JsonValueSerializer
56
56
*/
57
57
protected final boolean _forceTypeInformation ;
58
58
59
+ protected final Set <String > _ignoredProperties ;
60
+
59
61
/*
60
62
/**********************************************************************
61
63
/* Life-cycle
@@ -68,16 +70,18 @@ public class JsonValueSerializer
68
70
* {@link tools.jackson.databind.annotation.JsonSerialize#using}), otherwise
69
71
* null
70
72
*/
71
- public JsonValueSerializer (JavaType nominalType ,
73
+ protected JsonValueSerializer (JavaType nominalType ,
72
74
JavaType valueType , boolean staticTyping ,
73
75
TypeSerializer vts , ValueSerializer <?> ser ,
74
- AnnotatedMember accessor )
76
+ AnnotatedMember accessor ,
77
+ Set <String > ignoredProperties )
75
78
{
76
79
super (nominalType , null , vts , ser );
77
80
_valueType = valueType ;
78
81
_staticTyping = staticTyping ;
79
82
_accessor = accessor ;
80
83
_forceTypeInformation = true ; // gets reconsidered when we are contextualized
84
+ _ignoredProperties = ignoredProperties ;
81
85
}
82
86
83
87
protected JsonValueSerializer (JsonValueSerializer src , BeanProperty property ,
@@ -88,6 +92,20 @@ protected JsonValueSerializer(JsonValueSerializer src, BeanProperty property,
88
92
_accessor = src ._accessor ;
89
93
_staticTyping = src ._staticTyping ;
90
94
_forceTypeInformation = forceTypeInfo ;
95
+ _ignoredProperties = src ._ignoredProperties ;
96
+ }
97
+
98
+ public static JsonValueSerializer construct (SerializationConfig config ,
99
+ JavaType nominalType ,
100
+ JavaType valueType , boolean staticTyping ,
101
+ TypeSerializer vts , ValueSerializer <?> ser ,
102
+ AnnotatedMember accessor )
103
+ {
104
+ JsonIgnoreProperties .Value ignorals = config .getAnnotationIntrospector ()
105
+ .findPropertyIgnoralByName (config , accessor );
106
+ return new JsonValueSerializer (nominalType , valueType , staticTyping ,
107
+ vts , ser , accessor ,
108
+ ignorals .findIgnoredForSerialization ());
91
109
}
92
110
93
111
public JsonValueSerializer withResolved (BeanProperty property ,
0 commit comments