如何格式化包含引号,逗号和大括号的表单数据

问题描述 投票:0回答:1

我有一种数据形式,其中的值包含引号,逗号和大括号。 (“”,{})。如何为蝗虫使用正确格式化:

devicePrint:{“ VERSION”:“ 2.1”,“ MFP”:{“ Browser”:{“ UserAgent”:“ Mozilla / 5.0(Linux; Android 6.0; Nexus 5 Build / MRA58N)AppleWebKit / 537.36(KHTML,like Gecko)Chrome / 80.0.3987.132 Mobile Safari / 537.36“,” Vendor“:” Google Inc。“,” VendorSubID“:”“,” BuildID“:” 20030107“,” CookieEnabled“:true},” IEPlugins“:{ },“ NetscapePlugins”:{},“屏幕”:{“ FullHeight”:735,“ AvlHeight”:735,“ FullWidth”:981,“ AvlWidth”:981,“ ColorDepth”:24,“ PixelDepth”:24} ,“系统”:{“平台”:“ Win32”,“系统语言”:“ zh-CN”,“时区”:360}},“外部IP”:“ 198.200.150.150”,“ MESC”:{“ mesc” :“ mi = 2; cd = 150; id = 30; mesc = 809641; mesc = 827099”}}

deviceCookieName:caDatadeviceDNA:_eventId:继续

locust
1个回答
0
投票

您是否在谈论如何在python代码中用特殊字符表示字符串?

我认为最简单的方法是使用三引号,例如:

"""my crazy string that contains {} and " and '"""
© www.soinside.com 2019 - 2024. All rights reserved.