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

2017-09-17 06:47:56 +08:00
 iKID

英文原文:

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

2182 次点击
所在节点    问与答
3 条回复
watzds
2017-09-17 09:17:33 +08:00
我觉得是,非一个有效 json 或"非"一个至少包含一个值的数组
mcfog
2017-09-17 10:16:34 +08:00
自己往下拉看 example 里 batch 相关的
iKID
2017-09-17 18:50:15 +08:00
@watzds 明白了!

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/391317

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX