[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User-defined record types
From: |
Stefan Monnier |
Subject: |
Re: User-defined record types |
Date: |
Fri, 18 Oct 2013 11:28:17 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> Something that represents JSON and YAML well would be nice. Currently
> we don't have an ELisp data structure that can preserve all JSON nuances
> without acrobatics (e.g. preserving the difference between "null" and
> "empty list" or the native JSON data types).
I don't understand what you mean here. It's very easy to have special
values, e.g. (defconst json-null (make-symbol "json-null")).
IIUC The problem of json.el is that it wants to provide a bridge between
traditional Elisp data structures and JSON, and there is no reliable
two-way conversion between the two.
IIUC the current json.el focuses on making sure that converting to JSON
and back returns the same object.
But I don't see any technical difficulty writing a json2.el alternative
which focuses on "to Elisp and back", i.e. when it reads a JSON object
it returns an Elisp object that preserves all JSON nuances so that it
can be reliably converted back to the "exact same" JSON object.
> a native XML data structure would also be nice. We have what libxml
> produces, dumped in an awkward tree, but nothing native.
Not sure what "native" can mean in this context: we were talking about
new Lisp-defined types.
Whereas you seem to be talking about getting access to objects defined
in other (non-Lisp) libraries, i.e. an FFI.
Or maybe you're just talking about a more efficient representation for
an XML/JSON tree. If Lisp-defined data types could offer that, it would be
great, of course, but I personally don't see how that would work.
Stefan
- Re: RFC: User-defined pseudovectors, (continued)
- Re: RFC: User-defined pseudovectors, Stefan Monnier, 2013/10/10
- Re: RFC: User-defined pseudovectors, Lars Brinkhoff, 2013/10/10
- Re: RFC: User-defined pseudovectors, Stefan Monnier, 2013/10/10
- Re: RFC: User-defined pseudovectors, Lars Brinkhoff, 2013/10/11
- Re: RFC: User-defined pseudovectors, Stefan Monnier, 2013/10/11
- User-defined record types, Lars Brinkhoff, 2013/10/12
- Re: User-defined record types, Stefan Monnier, 2013/10/15
- Re: User-defined record types, Ted Zlatanov, 2013/10/18
- Re: User-defined record types,
Stefan Monnier <=
- Re: User-defined record types, Ted Zlatanov, 2013/10/18
- Re: User-defined record types, Stefan Monnier, 2013/10/18
- RE: User-defined record types, Drew Adams, 2013/10/18
- Re: User-defined record types, Ted Zlatanov, 2013/10/19
- Re: User-defined record types, Stefan Monnier, 2013/10/19
- Re: User-defined record types, Ted Zlatanov, 2013/10/19
- Re: User-defined record types, Stefan Monnier, 2013/10/19
- Re: RFC: User-defined pseudovectors, Stefan Monnier, 2013/10/10