[cl-json-devel] Encoding DOUBLE-FLOAT

Daniel Brunner daniel at dbrunner.de
Wed Jun 22 16:59:15 UTC 2011


Hm. I am using exact the same line of code:

CL-USER> (json:encode-json-to-string 0.0570714084012434D0)
"0.0570714084012434D0"

I have cl-json 0.4.0 on Cluzure Common Lisp "Version
1.7-dev-r14406M-trunk  (LinuxX8664)"

Kind regards, Daniel

Am 22.06.2011 11:03, schrieb Boris Smilga:
> On Wed, Jun 22, 2011 at 8:23 AM, Daniel Brunner <daniel at dbrunner.de> wrote:
> 
>> I get some numbers (DOUBLE-FLOAT) from CLSQL, e.g.
>>
>> 0.0570714084012434D0
>>
>> If I encode this to JSON I get a "0.0570714084012434D0" but it seems
>> that the notation with "D" is not valid JSON because when I try to
>> decode this string say from R with rjson I get an error.
> 
> This is very strange. I get:
> 
> (json:encode-json-to-string 0.0570714084012434D0)
> ⇒ "0.0570714084012434"
> 
> How exactly do you get your output with D?
> 
> Yours,
>  - B. Sm.
> 





More information about the cl-json-devel mailing list