I am using JMS\Serializer in my project and I want to ignore one property only if the array in it is empty.
I tried something like :
@JMS\Exclude(if="count('$this->required') === 0")
or
@JMS\Exclude(if="empty('required')")
but got a syntax error.
Can anyone help me on this?
thank.