MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / escapeJsonValue

Function escapeJsonValue

lib/core/common.py:1812–1832  ·  view source on GitHub ↗

Escapes JSON value (used in payloads) # Reference: https://stackoverflow.com/a/16652683 >>> "\\n" in escapeJsonValue("foo\\nbar") False >>> "\\\\t" in escapeJsonValue("foo\\tbar") True

(value)

Source from the content-addressed store, hash-verified

1810 kb.originalUrls[conf.url] = originalUrl
1811
1812def escapeJsonValue(value):
1813 """
1814 Escapes JSON value (used in payloads)
1815
1816 # Reference: https://stackoverflow.com/a/16652683
1817
1818 >>> "\\n" in escapeJsonValue("foo\\nbar")
1819 False
1820 >>> "\\\\t" in escapeJsonValue("foo\\tbar")
1821 True
1822 """
1823
1824 retVal = ""
1825
1826 for char in value:
1827 if char < ' ' or char == '"':
1828 retVal += json.dumps(char)[1:-1]
1829 else:
1830 retVal += char
1831
1832 return retVal
1833
1834def expandAsteriskForColumns(expression):
1835 """

Callers 1

queryPageMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…