def generate_map(map, name='url_map'):
    map.update()
    rules = []
    converters = []
    for rule in map.iter_rules():
        trace = [{
            'is_dynamic':   is_dynamic,
            'data':         data
        } for is_dynamic, data in rule._trace]
        rule_converters = {}
        for key, converter in rule._converters.iteritems():
            js_func = js_to_url_function(converter)
            try:
                index = converters.index(js_func)
            except ValueError:
                converters.append(js_func)
                index = len(converters) - 1
            rule_converters[key] = index
        rules.append({
            u'endpoint':    rule.endpoint,
            u'arguments':   list(rule.arguments),
            u'converters':  rule_converters,
            u'trace':       trace,
            u'defaults':    rule.defaults
        })

    return _javascript_routing_template.render({
        'name_parts':   name and name.split('.') or [],
        'rules':        dumps(rules),
        'converters':   converters
    })
Process incoming <stream:features/> element.
dataset/ETHPy150Open IanLewis/kay/kay/lib/werkzeug/contrib/jsrouting.py/generate_map--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python3-alpha/python-libs/pyxmpp2/binding.py/ResourceBindingHandler.handle_stream_features