84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
这个需求的主要原因是第三方服务会POST一个JSON参与加密算法,用以给调用方确认第三方的正身。
现在的问题是,第三方服务POST过来的JSON顺序是1,2,3,通过request.get_json()上来的数据就是3,1,2,顺序不同导致效验结果就有差异。
有什么办法获取请求体的JSON同时不改变之前的JSON顺序?
Did you have a problem with the order during the process of converting json to dictionary? When converting a dictionary, you can use the orderDict data structure
You can write a custom json_decoder and then overwrite it
http://flask.pocoo.org/docs/0.10/api/#flask.Flask.json_decoder
Did you have a problem with the order during the process of converting json to dictionary? When converting a dictionary, you can use the orderDict data structure
You can write a custom json_decoder and then overwrite it
http://flask.pocoo.org/docs/0.10/api/#flask.Flask.json_decoder