From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
On Sat, May 6, 2017 at 12:51 AM, Theresa O'Connor <<= a href=3D"mailto:hober0@gmail.com" target=3D"_blank">hober0@gmail.com&g= t; wrote:
> 1. `json-skip-whitespace' uses a hardcoded list of whitespace
> characters, which means it fails to skip over other WSpace=3DY
> characters. It should probably use `search-whitespace-regexp' from=
> isearch.el (or an equivalent value from elsewhere) instead.
JSON is defined by the standard [ECMA-404][1].
[1]: http://www.ecma-intern= ational.org/publications/files/ECMA-ST/ECMA-404.pdf
Section 4, paragraph the last:
| Insignificant whitespace is allowed before or after any token.
| The whitespace characters are: character tabulation (U+0009),
| line feed (U+000A), carriage return (U+000D), and space (U+0020).
In my copy of Emacs 25.1, json-skip-whitespace looks like this:
(defun json-skip-whitespace ()
=C2=A0 "Skip past the whitespace at point."
=C2=A0 (skip-chars-forward "\t\r\n\f\b "))
that is, it skips the whitespace characters defined by the spec, and
in addition to that, also form feed (U+000C) and backspace (U+0007).
If anything, \f\b should be *removed* from characters to be skipped.