You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an array with several Office Objects. When serializing, I would like to exclude some if these objects, based on dynamic conditions. The documentation shows how to do that with @exclude and the annoation field if.
While it works for normal properties, the dynamic part (if) of @exclude does not seem to be used when applied to a class.
All office objects are included in the serialized result, since the exclude condition evalues to false
Actual Result
[
{},
{}
]
No office objects are serialized, since the condition seems not be be evaluated.
I've also triedit with a real world example (isGranted provided by the Symfony bundle), but the isGranted method is never called. There is also no exception when using an invalid method, for example @Exclude(if="noSuchMethod('view',object)") which makes me believe that the condition is not even parsed.
The text was updated successfully, but these errors were encountered:
Hi,
I have an array with several Office Objects. When serializing, I would like to exclude some if these objects, based on dynamic conditions. The documentation shows how to do that with @exclude and the annoation field if.
While it works for normal properties, the dynamic part (if) of @exclude does not seem to be used when applied to a class.
Steps required to reproduce the problem
Expected Result
Actual Result
I've also triedit with a real world example (isGranted provided by the Symfony bundle), but the isGranted method is never called. There is also no exception when using an invalid method, for example
@Exclude(if="noSuchMethod('view',object)")
which makes me believe that the condition is not even parsed.The text was updated successfully, but these errors were encountered: