There's a problem with the packaging of cl-json.
========================================================================
CL-USER(1): (asdf-install:install :cl-json)
;;; Installing acldns patch, version 1
;;; ASDF-INSTALL: Downloading 9618 bytes from http://common-lisp.net/project/cl-json/cl-json_0.1.3.tar.gz to /usr/local/asdf-install/site/CL-JSON.asdf-install-tmp ...
gpg: Signature made Wed Feb 22 23:15:11 2006 CET using DSA key ID 13DC794B
gpg: Can't check signature: public key not found
…
[View More]"[GNUPG:] ERRSIG DB0819FF13DC794B 17 2 00 1140646511 9"
"[GNUPG:] NO_PUBKEY DB0819FF13DC794B"
Error: No key found for key id 0xDB0819FF13DC794B. Try some command like
gpg --recv-keys 0xDB0819FF13DC794B
[condition type: KEY-NOT-FOUND]
Restart actions (select using :continue):
0: Don't check GPG signature for this package
1: Return to Top Level (an "abort" restart).
2: Abort entirely from this (lisp) process.
[1] CL-USER(2): :cont 0
;;; ASDF-INSTALL: Installing /usr/local/asdf-install/site/CL-JSON.asdf-install-tmp in /usr/local/asdf-install/site/, /usr/local/asdf-install/site-systems/
cl-json_0.1.3/src/common.lisp
cl-json_0.1.3/src/encoder.lisp
cl-json_0.1.3/src/decoder.lisp
cl-json_0.1.3/src/package.lisp
cl-json_0.1.3/t/testjson.lisp
cl-json_0.1.3/t/fail1.json
cl-json_0.1.3/t/fail10.json
cl-json_0.1.3/t/fail11.json
cl-json_0.1.3/t/fail12.json
cl-json_0.1.3/t/fail13.json
cl-json_0.1.3/t/fail14.json
cl-json_0.1.3/t/fail15.json
cl-json_0.1.3/t/fail16.json
cl-json_0.1.3/t/fail17.json
cl-json_0.1.3/t/fail18.json
cl-json_0.1.3/t/fail19.json
cl-json_0.1.3/t/fail2.json
cl-json_0.1.3/t/fail20.json
cl-json_0.1.3/t/fail21.json
cl-json_0.1.3/t/fail22.json
cl-json_0.1.3/t/fail23.json
cl-json_0.1.3/t/fail24.json
cl-json_0.1.3/t/fail3.json
cl-json_0.1.3/t/fail4.json
cl-json_0.1.3/t/fail5.json
cl-json_0.1.3/t/fail6.json
cl-json_0.1.3/t/fail7.json
cl-json_0.1.3/t/fail8.json
cl-json_0.1.3/t/fail9.json
cl-json_0.1.3/t/package.lisp
cl-json_0.1.3/t/pass1.json
cl-json_0.1.3/t/pass2.json
cl-json_0.1.3/t/pass3.json
cl-json_0.1.3/t/testencoder.lisp
cl-json_0.1.3/t/testdecoder.lisp
cl-json_0.1.3/doc/index.html
cl-json_0.1.3/doc/style.css
cl-json_0.1.3/json.asd
#P"/usr/local/asdf-install/site/cl-json_0.1.3/"
#P"/usr/local/asdf-install/site/cl-json_0.1.3/"
Error: component "cl-json" not found
[condition type: MISSING-COMPONENT]
Restart actions (select using :continue):
0: Retry installation
1: Return to Top Level (an "abort" restart).
2: Abort entirely from this (lisp) process.
[1] CL-USER(3): :cont 1
No man's ambition has a right to stand in the way of performing a simple
act of justice.
-- John Altgeld
CL-USER(4): (asdf:oos 'asdf:load-op :cl-json)
Error: component "cl-json" not found
[condition type: MISSING-COMPONENT]
Restart actions (select using :continue):
0: Return to Top Level (an "abort" restart).
1: Abort entirely from this (lisp) process.
[1] CL-USER(5): :q
CL-USER(6):
========================================================================
With the attached patch, we can install and load it smoothly.
(Rename the system file cl-json.asd and rename the defsystem :cl-json
to put some consistency in).
========================================================================
CL-USER(1): (asdf:oos 'asdf:load-op :cl-json)
; loading system definition from
; /usr/local/asdf-install/site-systems/cl-json.asd into
; #<The ASDF0 package>
; registering #<SYSTEM :CL-JSON @ #x71c55e5a> as CL-JSON
; registering #<SYSTEM :JSON.TEST @ #x71aa2b2a> as JSON.TEST
NIL
========================================================================
--
Pascal Bourguignon
http://www.ravenpack.com/
[View Less]
On Wed, 2007-01-10 at 16:35 +0000, Jonathon McKitrick wrote:
> Hi Henrik,
>
> I'm going to find your cl-json library very helpful!
>
Wow, a real user! :-)
> I have a question about your test suite, as I am also looking into
>integrating
> a comprehensive test suite to my project. How can you have 2 defsystems in
> the same .asd file? How do you load one system and not the other? I don't
> think I've ever seen this done before.
I'm no expert on asdf, but this …
[View More]works:
(asdf:oos 'asdf:load-op :json)
followed by
(asdf:oos 'asdf:load-op :json.test)
I think I saw it in either UnCommonWeb which has a lot of systems in one
asd file, or cl-sql, which has an advanced asd file.
And please try out the darcs version of cl-json, I have added some stuff
like a json-bind macro and json-rpc.
There is one thing I want to decide before releasing a new version: I'm
not sure that it is the best idea to intern parsed json in the keyword
package. Any opinions on this matter or other matters are appreciated..
> I'm trying to decide if my test suite should be a separate system or
> integrated into the existing system.
Actually when I code most of my things I keep the programmer-tests in
the same files and system as the rest of the code. I think tests
document and explain how a function is used, and then I don't want to
look in another file.
Why I keep tests in a separate system for cl-json I don't know, I guess
it looks nicer or maybe it is just because I've seen other do this... I
can't really think of really why this is better though..
/Henrik
[View Less]
Hello!
One thing I discovered when I tried to encode a big s-exp with
encode-json-to-string is that it doesn't support characters.
This kind of makes sense, since JSON itself doesn't have a separate
"character" type, and some of the big usrs of JSON (ECMAscript and
Python) don't, either. A JSON decoder couldn't tell what's a length-1
string, and what's a character.
OTOH, for my program, it would be really handy to *encode* characters directly.
I decided to try writing a patch, after about …
[View More]5 seconds came up with this:
(defmethod encode-json ((c character) stream)
(encode-json (string c) stream))
Since this is Lisp, it's both insanely easy, and it doesn't have to be
part of cl-json for me to use it as if it was. :-)
I guess it doesn't really benefit me for this to be part of cl-json,
but if that's of any use to you, feel free to use/add it.
cheers,
- Ken
[View Less]
Suggestion:
(defun json-escaped-char-to-lisp(json-escaped-char)
(or
(cdr (assoc json-escaped-char *json-lisp-escaped-chars*))
json-escaped-char))
The existing implementation is correct, just not particularly
tolerant of what people actually do. In particular it parsing of
json from del.icio.us.
It can handle:
(json:decode-json-from-string "right's of man")
but not
(json:decode-json-from-string "right\\'s of man")
"generous in what you accept", and all that.
- ben
…
[View More]
"... no code should do that unless it should." -- Marc Slemko
[View Less]
Hi,
Is this intentional? (This tested against a brand-new checkout
from the darcs repo.)
----
* (in-package :json)
#<PACKAGE "JSON">
* (encode-json-to-string 'x)
"\"X\""
* (make-hash-table)
#<HASH-TABLE :TEST EQL :COUNT 0 {40148169}>
* (setf (gethash 'x *) 5)
5
* (encode-json-to-string **)
"{\"\"X\"\":5}"
----
Dump this out to a stream, and you get
{""X"":5}
which isn't so useful.
I suspect it's because the symbol is encoded to "X", and then
wrapped in …
[View More]quotes anyway.
I thought I'd mail the list before attempting to fix and submit a
patch.
Opinions?
-R
[View Less]