def __getObjectAsString(self, obj):
        obj_string = '{'
        i = 0
        for attr in obj.attrs:
            key = attr
            if hasattr(obj, key):
                value = getattr(obj, key)
                if not value == None:
                    if i > 0:
                        obj_string += ','
                    if str(value) == 'true' or str(value) == 'false':
                        value_string = value
                    else:
                        value_string = '"'+str(value)+'"'
                    key_string = '"'+key+'"'
                    obj_string += '%s:%s' % (key_string, value_string)
                    i+=1
        obj_string += '}'
        return obj_string
@param obj: Object
dataset/ETHPy150Open pyjs/pyjs/pyjswaddons/FlowPlayer.py/Player.__getObjectAsString