XML-RPC:64 位整数的最佳选择?

发布于 2024-07-13 03:01:00 字数 117 浏览 4 评论 0原文

不幸的是,XML-RPC 不支持官方标准中的 64 位整数。 似乎有几个扩展添加了此支持。

其中是否有哪一个似乎更受欢迎或更受支持? 您使用哪个扩展?

感谢所有语言的答案。

XML-RPC unfortunately doesn't support 64-bit ints in the official standard. It seems there are several extensions that add this support.

Do any of them seem to be more popular or better supported? Which extension do you use?

Answers for all languages appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

怪我太投入 2024-07-20 03:01:00

好吧,似乎对此没有很好的答案,所以我们只是做了一个内部扩展,表示“整数类型是无界的”。

在我们的 python 库中,我注释掉了这个检查:

def dump_int(self, value, write):
    # in case ints are > 32 bits
    ## extension: ints can be arbitrarily sized
    ## if value > MAXINT or value < MININT:
    ##    raise OverflowError, "int exceeds XML-RPC limits"

Well it seems there's no great answer for this, so we're just making an internal extension that says "integer types are unbounded."

In our python library, I'm commenting out this check:

def dump_int(self, value, write):
    # in case ints are > 32 bits
    ## extension: ints can be arbitrarily sized
    ## if value > MAXINT or value < MININT:
    ##    raise OverflowError, "int exceeds XML-RPC limits"
情泪▽动烟 2024-07-20 03:01:00

这有关系吗? 如果您正在谈论“不兼容”的更改,那么您正在谈论事实上与标准“不兼容”的两个系统,因此...只需调整您正在使用的 XML RPC 库即可完成用它。

否则,如果您想保持兼容,欢迎来到字符串的美妙世界。

(马克·哈里森更新)这确实很重要,因为如果其他人也在这样做,我们希望遵循最常见的方法。

Does this matter? If you're talking about an "incompatible" change, then you're talking about two systems that are, de facto, "incompatible" with the standard, so... just tweak the XML RPC lib you're using and be done with it.

Otherwise, if you want to remain compatible, welcome to the wonderful world of Strings.

(update by Mark Harrison) It does matter, since we would like to follow the most common method if other people are also doing this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文