mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-02 08:22:22 +00:00
29d740aac9
Add support for retrieving the path to a JSON element. This can for instance be useful to retrieve paths in deeply nested JSON structures. * lisp/json.el (json-pre-element-read-function) (json-post-element-read-function): New variables to hold pre- and post read callback functions for `json-read-array' and `json-read-object'. (json--path): New variable used internally by `json-path-to-position'. (json--record-path, json--check-position): New functions used internally by `json-path-to-position'. (json-path-to-position): New function for retrieving the path to a JSON element at a given position. (json-read-object, json-read-array): Call `json-pre-element-read-function' and `json-post-element-read-function' when set. * test/automated/json-tests.el (test-json-path-to-position-with-objects) (test-json-path-to-position-with-arrays) (test-json-path-to-position-no-match): New tests for `json-path-to-position'. |
||
---|---|---|
.. | ||
automated | ||
cedet | ||
etags | ||
indent | ||
BidiCharacterTest.txt | ||
biditest.el | ||
ChangeLog.1 | ||
README | ||
redisplay-testsuite.el | ||
rmailmm.el |
This directory contains files intended to test various aspects of Emacs's functionality. Please help add tests! (Also, see etc/compilation.txt for compilation mode font lock tests.)