def to_primitive(self, context=None):
        """
        .. versionadded:: 1.3.0
        """
        primitive = super(ValueConstant, self).to_primitive(context)
        value = self.value

        if hasattr(value, 'isoformat'):
            value = value.isoformat()
        elif callable(value):
            value = value()

        primitive['value'] = value
        return primitive
.. versionadded:: 1.3.0