def METHOD_NAME(value, stack, gap, property_list, replacer_function, space):
    global indent
    if value in stack:
        raise MakeError('TypeError', 'Converting circular structure to JSON')
    stack.add(value)
    stepback = indent
    indent += gap
    if not is_undefined(property_list):
        k = property_list
    else:
        k = [unicode(e) for e, d in value.own.items() if d.get('enumerable')]
    partial = []
    for p in k:
        str_p = Str(p, value, replacer_function, property_list, gap, stack,
                    space)
        if not is_undefined(str_p):
            member = json.dumps(p) + ':' + (
                ' ' if gap else
                '') + str_p  # todo not sure here - what space character?
            partial.append(member)
    if not partial:
        final = '{}'
    else:
        if not gap:
            final = '{%s}' % ','.join(partial)
        else:
            sep = ',\n' + indent
            properties = sep.join(partial)
            final = '{\n' + indent + properties + '\n' + stepback + '}'
    stack.remove(value)
    indent = stepback
    return final