iKID
V2EX  ›  问与答

关于 JSON-RPC 2.0 标准,有一句描述无法理解

  •  1
     
  •   iKID · Sep 17, 2017 · 3037 views
    This topic created in 3182 days ago, the information mentioned may be changed or developed.

    英文原文:

    6 Batch

    If the batch rpc call itself fails to be recognized as an valid JSON or as an Array with at least one value, the response from the Server MUST be a single Response object. If there are no Response objects contained within the Response array as it is to be sent to the client, the server MUST NOT return an empty Array and should return nothing at all.

    中文译文:

    若批量调用的 rpc 操作本身非一个有效 json 或一个至少包含一个值的数组,则服务端返回的将单单是一个响应对象而非数组。若批量调用没有需要返回的响应对象,则服务端不需要返回任何结果且必须不能返回一个空数组给客户端。

    原文地址: http://www.jsonrpc.org/specification#batch

    译文地址: http://wiki.geekdream.com/Specification/json-rpc_2.0.html

    老实说,加粗的地方有看没有懂,求达人解释下 0 0

    3 replies    2017-09-17 18:50:15 +08:00
    watzds
        1
    watzds  
       Sep 17, 2017 via Android   ❤️ 1
    我觉得是,非一个有效 json 或"非"一个至少包含一个值的数组
    mcfog
        2
    mcfog  
       Sep 17, 2017
    自己往下拉看 example 里 batch 相关的
    iKID
        3
    iKID  
    OP
       Sep 17, 2017
    @watzds 明白了!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2820 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 15:27 · PVG 23:27 · LAX 08:27 · JFK 11:27
    ♥ Do have faith in what you're doing.