def classToDict(obj=None):
	"""
	Transform an object into a dict so it can be JSONified.
	Useful for turning custom classes into JSON-compatible dictionaries.
	"""
	if obj == None:
		return {}

	_obj = {}
	_obj.update(obj.__dict__)

	return _obj