擅长:python、mysql、java
<p>不要使用三重引号<code>"""</code>。相反,使用带有<code>json.dumps()</code>的字典,这样值中的逗号就不会被误解为项目之间的逗号</p>
<pre><code>import json
json_data = {
'position1': '516, 440',
'position2': '971, 443',
'position3': '1186, 439',
'position4': '1402, 441',
'position5': '1630, 449',
'position6': '299, 681',
'position7': '518, 684',
'position8': '736, 691',
'position9': '739, 431'
}
data = json.dumps(json_data)
print(data)
</code></pre>