MCPcopy Index your code
hub / github.com/python-visualization/folium / _to_escaped_json

Function _to_escaped_json

folium/template.py:37–44  ·  view source on GitHub ↗
(obj: TypeJsonValue)

Source from the content-addressed store, hash-verified

35
36
37def _to_escaped_json(obj: TypeJsonValue) -> str:
38 return (
39 json.dumps(obj)
40 .replace("<", "\\u003c")
41 .replace(">", "\\u003e")
42 .replace("&", "\\u0026")
43 .replace("'", "\\u0027")
44 )
45
46
47class Environment(jinja2.Environment):

Callers 3

test_to_escaped_jsonFunction · 0.90
tojavascriptFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_to_escaped_jsonFunction · 0.72