Mark Harrison
Mark Harrison

Reputation: 304654

XML-RPC: best options for 64 bit ints?

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.

Upvotes: 4

Views: 1572

Answers (2)

Mark Harrison
Mark Harrison

Reputation: 304654

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"

Upvotes: 4

Will Hartung
Will Hartung

Reputation: 118774

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.

Upvotes: 0

Related Questions