emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JSON/YAML/TOML/etc. parsing performance


From: Philipp Stephani
Subject: Re: JSON/YAML/TOML/etc. parsing performance
Date: Mon, 18 Sep 2017 14:14:13 +0000



Mark Oteiza <address@hidden> schrieb am Mo., 18. Sep. 2017 um 15:58 Uhr:
Was there a particular reason (aside from access time) you chose
hash tables instead of a sexp form?

- Hashtables have similar constraints as the underlying JSON objects (no duplicate keys, no ordering), so they are a better match.
- Hashtables have non-nil empty values. If I had uses alists, I would have had to introduce a separate keyword :json-null for null.
- Hashtables always represent maps, but alists are also normal sequences, so users could expect that they get translated into arrays instead of objects.
- Using only one data structure per JSON object type makes the interface and implementation simpler.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]