def js_value(name, value): return mark_safe("<script type='text/javascript'> var %s = %s </script>" % (name, ui.as_json(value)))
def data_attr(name, value): return " %s='%s' " % (name, ui.as_json(value))
def json(values): return ui.as_json(values)