diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2015-03-25 21:54:29 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2015-03-25 21:54:29 +0200 |
commit | 58c86059c60bc27e9eadba5735da5a40b47f6005 (patch) | |
tree | 88b49d8b41f36d173824c96184588ebdfec27f17 /test/automated/json-tests.el | |
parent | 2b828866c2df5ea558283e4c3f4c79a404918bea (diff) | |
download | emacs-58c86059c60bc27e9eadba5735da5a40b47f6005.tar.gz emacs-58c86059c60bc27e9eadba5735da5a40b47f6005.tar.bz2 emacs-58c86059c60bc27e9eadba5735da5a40b47f6005.zip |
Only escape quotation mark, backslash and cntrl U+0000 to U+001F
* lisp/json.el (json-special-chars): Don't treat `/' specially, there's
no need to.
(json-encode-string): Only escape quotation mark, backslash and
the control characters U+0000 to U+001F.
Diffstat (limited to 'test/automated/json-tests.el')
-rw-r--r-- | test/automated/json-tests.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/automated/json-tests.el b/test/automated/json-tests.el index 881c237261c..fd89b7aa994 100644 --- a/test/automated/json-tests.el +++ b/test/automated/json-tests.el @@ -35,8 +35,8 @@ (ert-deftest json-encode-string-with-special-chars () (should (equal (json-encode-string "a\n\fb") "\"a\\n\\fb\"")) - (should (equal (json-encode-string "\nasdфывfgh\t") - "\"\\nasd\\u0444\\u044b\\u0432fgh\\t\""))) + (should (equal (json-encode-string "\nasdфыв\u001f\u007ffgh\t") + "\"\\nasdфыв\\u001f\u007ffgh\\t\""))) (ert-deftest json-read-string-with-special-chars () (should (equal (json-read-from-string "\"\\nasd\\u0444\\u044b\\u0432fgh\\t\"") |