[cl-json-devel] cl-json depends on lisp reader?
Sven Emtell
sven.emtell at doremir.com
Wed Oct 31 23:08:16 UTC 2012
Thanks Boris!
I'll see what to do.
Best regards,
Sven
31 okt 2012 kl. 23:26 skrev Boris Smilga:
> On Wed, Oct 31, 2012 at 5:07 PM, Sven Emtell <sven.emtell at doremir.com> wrote:
>>
>> I use cl-json with LispWorks 6.1.
>> When delivering an app, I am trying to minimize the size of it by setting delivery level 5.
>> The cl-json function "decode-json-from-string" does not seem to like this without explicitly keeping the Lisp Reader using the delivery keyword (:keep-lisp-reader).
>> Since the Lisp Reader is unnecessary for the rest of the app, I would like to leave it out when delivering.
>> Any thoughts on this?
>
> The Lisp reader is used on just one occasion, namely, in the function PARSE-NUMBER in src/decoder.lisp (line 417ff., four uses of READ-FROM-STRING). You can easily ditch it by supplying another parser for numbers. For this end, you have three options: A) wait for someone to develop a replacement—without guarantees; B) write a replacement yourself, send a patch to the maintainers, and wait for it to be pushed to the repository; C) customize DECODE-JSON in your own code, by setting or binding the handlers for number token. If you choose option C, I'd suggest you read the relevant chapter in the User Guide (http://common-lisp.net/project/cl-json/#DECODER-CUSTOMIZATION). The handlers in question are represented by the variables *INTEGER-HANDLER* and *REAL-HANDLER*.
>
> Sincerely,
> — B. Smilga.
>
More information about the cl-json-devel
mailing list