unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* help with guile-json inconsistencies
@ 2018-12-09 10:56 Aleix Conchillo Flaqué
  2018-12-10  6:33 ` Aleix Conchillo Flaqué
  0 siblings, 1 reply; 10+ messages in thread
From: Aleix Conchillo Flaqué @ 2018-12-09 10:56 UTC (permalink / raw)
  To: guile-user

Hi guilers,

a new guile-json issue came to me recently:

https://github.com/aconchillo/guile-json/issues/22

I don't really have a solution yet on how to solve this, so I would
love some advice. The issue is that one can do:

  (scm->json '(1 2 3)) which returns [1,2,3]

however, if you do:

  (scm->json '((1 2 3)) it returns {"1":[2,3]} but one would probably
expect [[1,2,3]]
  (scm->json '((1 2 3) (4 5 6)) it returns {"1":[2,3], "4":[5,6]} but
one would probably expect [[1,2,3], [4,5,6]]

I guess the first question is, does everyone else feel the same way
about the return value?

The problem is that there's a function that checks if something is an
alist by basically checking if it's a pair? recursively and if so, it
builds a json object.

In the past, guile-json had a macro (json) which allowed you to do
(json (array (array...))) but I just realized it has exactly the same
problem. But may be there's some way to fix it.

Any help would be appreciated!

Best,

Aleix



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-12-11 17:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.28267.1544480212.1283.guile-user@gnu.org>
2018-12-11  0:37 ` help with guile-json inconsistencies Zelphir Kaltstahl
2018-12-11  5:18   ` Aleix Conchillo Flaqué
2018-12-11  8:31     ` Zelphir Kaltstahl
2018-12-11 17:40       ` Aleix Conchillo Flaqué
2018-12-09 10:56 Aleix Conchillo Flaqué
2018-12-10  6:33 ` Aleix Conchillo Flaqué
2018-12-10  7:27   ` Aleix Conchillo Flaqué
2018-12-10  8:12     ` swedebugia
2018-12-10 20:55     ` Alex Vong
2018-12-10 21:48       ` John Cowan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).