GNU bug report logs -
#21798
25.0.50; [PATCH] Add support for retrieving paths to JSON elements
Previous Next
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
Message #44 received at 21798 <at> debbugs.gnu.org (full text, mbox):
Hi again, Simen.
On 11/08/2015 02:32 PM, Simen Heggestøyl wrote:
> 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.
Thank you, but since `json-read' needs an optional argument in this case
(which is not trivial to describe), I'd rather we go back to the
previous patch.
How about renaming json-pre-read-function to
json-pre-element-read-function, maybe? And same for the other one.
If you're fine with that, please install the result. (Or without the
rename, it's up to you).
> 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)
Nice! The extra code made it faster. :)
Apparently, the difference is within the margin of error.
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.