• 请不要在回答技术问题时复制粘贴 AI 生成的内容
leoleoasd
V2EX  ›  程序员

微信支付这样睿智的 api 定义 也是没谁了

  •  
  •   leoleoasd ·
    leoleoasd · Sep 25, 2018 · 5153 views
    This topic created in 2969 days ago, the information mentioned may be changed or developed.
    1. 都 8102 年了还用 xml 这点可能是遗留问题不予深究

    但是

    xml 和 json 混用就 tmd 不能忍了啊!!

    请求里 url 中加一个 format=json 就那么困难吗???

    16 replies  •  2018-09-26 15:33:56 +08:00
    boris1993
    boris1993
    Sep 25, 2018 via Android
    2
    json 里面再放个 yaml 就更舒服了
    Guaidaodl
    Guaidaodl
    Sep 25, 2018❤️2
    3
    leoleoasd
    leoleoasd
    OP
    Sep 25, 2018
    4
    @Guaidaodl #3 噗笑死我了哈哈哈哈
    keysona
    keysona
    Sep 25, 2018❤️1
    5
    zhuangbility, geiliable … …

    承包了我今日的笑点
    TangMonk
    TangMonk
    Sep 25, 2018
    6
    @keysona 英语很溜
    xuanbg
    xuanbg
    Sep 25, 2018
    7
    三楼的我看到序列化图片就喷了。。。
    yankebupt
    yankebupt
    Sep 25, 2018
    8
    @Guaidaodl @xuanbg CSV 那个还能接受,毕竟外面放了字段说明勉强可以算有用....
    序列化图片那个简直.....还不是 UINT 是带符号的 INT....表示太强迫症了...
    winglight2016
    winglight2016
    Sep 26, 2018
    9
    @Guaidaodl 还真有人以为这是在夸 XML,哈哈,太逗了
    cnbobolee
    cnbobolee
    Sep 26, 2018
    10
    现在 Java 各大项目的配置不还是 xml 么,也没看到改。
    metrxqin
    metrxqin
    Sep 26, 2018
    11
    @cnbobolee 配置信息和信元交换格式是两回事,XML 传输了大量不必要信息。
    AllOfMe
    AllOfMe
    Sep 26, 2018 via Android
    12
    @cnbobolee 感觉 xml 用在配置上挺合适的,没必要换别的
    raptor
    raptor
    Sep 26, 2018
    13
    @Guaidaodl 这两种情况在跟别人的系统对接时都碰到过。

    BTW:楼主是没碰到过阿里的 API 里强制使用 GB 编码,而 HTTP 规范里早就不推荐在 POST 的 form 里使用 encoding 选项了,werkzeug 也不支持,只能自己给 werkzeug 打补丁来处理。相比之微信这根本不是事
    Miy4mori
    Miy4mori
    Sep 26, 2018
    14
    XML 也能吐槽吗,微信的 API 槽点可不是 XML,而是各种奇葩逻辑。
    bsg1992
    bsg1992
    Sep 26, 2018
    15
    @Miy4mori 但是你不得不用啊
    leoleoasd
    leoleoasd
    OP
    Sep 26, 2018 via Android
    16
    @raptor 碰到过🌚编码问题整了半天
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1883 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 15:44 · PVG 23:44 · LAX 07:44 · JFK 10:44
    ♥ Do have faith in what you're doing.