code: def to_primitive(self, context=None):
          
          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
docs: .. versionadded:: 1.3.0