php与python如何相互对json传值进行数据md5校验?
例如python request传值
#!/usr/local/python3/bin/python3 # -*- coding: utf-8 -* import json data = {"text": "Hello, 你好 is a test message!"} key = "121323#1231" # 使用 ensure_ascii=False 避免 Unicode 转义 json_str = json.dumps(data) + key print(json_str)输出
而php
<?php $data = ["text" => "Hello, 你好 is a test message!"]; $key = "121323#1231"; // 使用 JSON_UNESCAPED_UNICODE 避免 Unicode 转义 $json_str = json_encode($data) . $key; echo $json_str; ?>

两者输出的字符串有差异,怎么解决?