code: def default(self, obj):
  		
  
  		# If we have a datetime object
  		if isinstance(obj, datetime):
  			return obj.strftime('%Y-%m-%d %H:%M:%S')
  
  		# Else if we have a decimal object
  		elif isinstance(obj, Decimal):
  			return '{0:f}'.format(obj)
  
  		# Bubble back up to the parent default
  		return json.JSONEncoder.default(self, obj)
docs: Default
  
  		Called when the regular Encoder can't figure out what to do with the type
  
  		Args:
  			self (CEncoder): A pointer to the current instance
  			obj (mixed): An unknown object that needs to be encoded
  
  		Returns:
  			str: A valid JSON string representing the object