本帖最后由 天大地大 于 2018-12-18 18:35 编辑
生成prepayId的时候需要组装一个json字符串,这个字符串组装起来真的麻烦,仅能是{\"jsonrpc\": \"2.0\", \"method\": \"getPrepayId\", \"params\": { \"service_id\": 100000, \"sign\": \"3a9098d981b01b3e1043e642cd01ac09\", \"timeout\": 60 }}
,不能是{ "jsonrpc": "2.0",
"method": "getPrepayId",
"params": "{\"service_id\":100000,\"sign\":\"3a9098d981b01b3e1043e642cd01ac09\",\"timeout\":180}"
}
或者
{\"jsonrpc\":\"2.0\",\"method\":\"getPrepayId\",\"params\":\"{\\\"service_id\\\":100000,\\\"sign\\\":\\\"3a9098d981b01b3e1043e642cd01ac09\\\",\\\"timeout\\\":180}\"}
,这个高难度的json字符串只能手动组装,不能代码组装了?
|
|