On Sun, Nov 27, 2011 at 06:39:52PM +0100, Moritz Heidkamp wrote:
Vok Vojwo cev...@gmail.com writes:
I think the Medea egg intends to do it the right way. But it seems to be
buggy.
And it has a voracious appetite
It does indeed :-)
Medea fails to parse the data:
(use medea)
I am a bit confused by the way the JSON egg maps JSON structures to
Scheme values. The JSON egg maps a structure to a vector:
(use json)
(with-input-from-string {\pi\:3.14,\e\:2.71} json-read)
;; = #((pi . 3.14) (e . 2.71))
This makes it impossible to use the standard Scheme function assoc to
* Vok Vojwo cev...@gmail.com [27 14:16]:
(assoc* (json-alist json) feed title $t)
;; = Official Google External Developer Events
Is there any reason why the JSON egg creates vectors of pairs?
If not I would suggest to fix it to make it more schemish.
I agree with you and I can only
2011/11/27 Christian Kellermann ck...@pestilenz.org:
My guess is that it makes it possible to write back to json, since
alists are already used for representing a different datatype.
But json-write does not accept alists as values. This
(json-write (vector (cons x (list (cons a 1) (cons b
Even though I agree that it should be schemish,
it must be consistent.
How would you deal with
{1:[2,3],4:[5,6]}
and
[[1,2,3],[4,5,6]]
that must be distinguished?
Furthermore, if we were to change the spec of the json egg,
we should be aware with backward compatibility issues.
Otherwise, I need
* Vok Vojwo cev...@gmail.com [27 14:37]:
2011/11/27 Christian Kellermann ck...@pestilenz.org:
My guess is that it makes it possible to write back to json, since
alists are already used for representing a different datatype.
But json-write does not accept alists as values. This
Hi Vok,
Vok Vojwo cev...@gmail.com writes:
I am a bit confused by the way the JSON egg maps JSON structures to
Scheme values. The JSON egg maps a structure to a vector:
(use json)
(with-input-from-string {\pi\:3.14,\e\:2.71} json-read)
;; = #((pi . 3.14) (e . 2.71))
I agree, this is indeed
2011/11/27 Moritz Heidkamp mor...@twoticketsplease.de:
You may be interested in two alternative JSON eggs, namely json-abnf egg
(GPLed) which represents both JSON objects as tagged lists alists
(i.e. they have a symbol `object' their car) and arrays as vectors or
the medea egg (BSD licensed)
Vok Vojwo scripsit:
I am a bit confused by the way the JSON egg maps JSON structures to
Scheme values. [...]
Is there any reason why the JSON egg creates vectors of pairs?
The problem is that JSON arrays and objects are disjoint, and the egg uses
lists to represent JSON arrays. Since lists
John Cowan co...@mercury.ccil.org writes:
They differ in their representation of JSON null, however: json-abnf
uses 'null, whereas medea's default is ()
the other way around, actually :-)
Moritz
___
Chicken-users mailing list
Vok Vojwo cev...@gmail.com writes:
I think the Medea egg intends to do it the right way. But it seems to be
buggy.
And it has a voracious appetite
It does indeed :-)
Medea fails to parse the data:
(use medea)
(read-json json) ;; = #f
Thanks for the hint. I managed to bisect it down to
Moritz Heidkamp mor...@twoticketsplease.de writes:
Thanks for the hint. I managed to bisect it down to a Unicode character
in one of the strings (’). Looking at medea's test suite I found this:
;; (test-read '#(Дҫ) [\Дҫ\]) ; FIXME genturfahi needs utf8 support for
that to work
So thanks
12 matches
Mail list logo