Home > other >  Bosses, about python Java interfaces, json Chinese as ASCII
Bosses, about python Java interfaces, json Chinese as ASCII

Time:05-20

# dictionary into a json string
AuditJson=json. Dumps (AuditDict, ensure_ascii=False)
Print (AuditJson)

Headers_Audit={' the content-type: "application/json"}
R1=requests. Post (url_Audit, json=AuditJson, headers=headers_Audit)
Print (r1. Text)

This writing, Java there received or ASCII format. Lead to the failure to json. Can you tell me how to solve the

Need is Chinese form transmission in json.

Added in the python ensure_ascii=False output over there is no problem, but is not passed