GNU bug report logs - #21798
25.0.50; [PATCH] Add support for retrieving paths to JSON elements

Previous Next

Package: emacs;

Reported by: Simen Heggestøyl <simenheg <at> gmail.com>

Date: Sat, 31 Oct 2015 08:47:01 UTC

Severity: wishlist

Tags: patch

Found in version 25.0.50

Done: Simen Heggestøyl <simenheg <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 21798 <at> debbugs.gnu.org
Subject: bug#21798: 25.0.50; [PATCH] Add support for retrieving paths to JSON elements
Date: Sun, 08 Nov 2015 13:32:13 +0100
[Message part 1 (text/plain, inline)]
Thanks again for your feedback, Dmitry.

On Sat, Nov 7, 2015 at 8:18 PM, Dmitry Gutov <dgutov <at> yandex.ru> wrote:
> Shouldn't they be called by `json-read' itself?

Yes, maybe they should. The only drawback I see is that 'json-read' then
needs to accept an optional parameter, which is the JSON key of the
current element.

A revised patch implementing your suggestion is attached.

Benchmarks follow below, with the usual setup!

Before the patch:

(benchmark-run 100 (json-read-from-string huge-json))
    ⇒ (18.782874379000003 1007 5.674178575000008)

After the patch:

(benchmark-run 100 (json-read-from-string huge-json))
    ⇒ (18.233328517999997 1007 4.907621599000008)

-- Simen


[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.