[fpc-devel] extend fpjson with support for cardinal/qword

Helmut Hartl helmut.hartl at firmos.at
Wed Apr 16 13:06:15 CEST 2014


Am 16.04.14 12:06, schrieb Michael Van Canneyt:
> ....
> 1. Cardinal should already be possible if you simply use Int64 to 
> transfer them.
>    There will be no type checking, but that is not a problem, we're 
> talking Javascript subset here...
Yes.
> 2. Qword: we should check whether Javascript supports this range of 
> value.
>    If so, a patch would be accepted.
Javascript (standard) internally uses doubleprecision floating points 
(http://ecma262-5.com/ELS5_HTML.htm#Section_8.5)
to represent it's numbers so to some extent it's possible to represent 
that numbers, although arithmetic would behave
strange in that ranges :-)

JS  is only a subset of my usecase - I want to store such values in a 
text representation  as a backup format for our
database server, and do not want to use a string representation.
I'll send you a patch against current trunk when ready, so you can have 
a look.

thx,

  helmut
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140416/3866e2d0/attachment.html>


More information about the fpc-devel mailing list