aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-02-13 21:39:28 +0300
committerZyX <kp-pav@yandex.ru>2016-04-18 02:48:20 +0300
commit2f67786796d5fb4237f4b0258ec3db0982cc7f53 (patch)
treedc8a7d2f10ce72316a8e1162ab160de7dc3aa1fb /runtime
parentf1ced96c28b7db7b3dad9b0ca2f71f8d046ef732 (diff)
downloadrneovim-2f67786796d5fb4237f4b0258ec3db0982cc7f53.tar.gz
rneovim-2f67786796d5fb4237f4b0258ec3db0982cc7f53.tar.bz2
rneovim-2f67786796d5fb4237f4b0258ec3db0982cc7f53.zip
eval: Rename json* functions to json_*
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt16
-rw-r--r--runtime/doc/vim_diff.txt18
2 files changed, 19 insertions, 15 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index f085dd2972..fea9e669e0 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1420,7 +1420,7 @@ v:exception The value of the exception most recently caught and not
*v:false* *false-variable*
v:false Special value used to put "false" in JSON and msgpack. See
- |jsonencode()|. This value is converted to "false" when used
+ |json_encode()|. This value is converted to "false" when used
as a String (e.g. in |expr5| with string concatenation
operator) and to zero when used as a Number (e.g. in |expr5|
or |expr7| when used with numeric operators).
@@ -1566,7 +1566,7 @@ v:msgpack_types Dictionary containing msgpack types used by |msgpackparse()|
*v:null* *null-variable*
v:null Special value used to put "null" in JSON and NIL in msgpack.
- See |jsonencode()|. This value is converted to "null" when
+ See |json_encode()|. This value is converted to "null" when
used as a String (e.g. in |expr5| with string concatenation
operator) and to zero when used as a Number (e.g. in |expr5|
or |expr7| when used with numeric operators).
@@ -1738,7 +1738,7 @@ v:throwpoint The point where the exception most recently caught and not
*v:true* *true-variable*
v:true Special value used to put "true" in JSON and msgpack. See
- |jsonencode()|. This value is converted to "true" when used
+ |json_encode()|. This value is converted to "true" when used
as a String (e.g. in |expr5| with string concatenation
operator) and to one when used as a Number (e.g. in |expr5| or
|expr7| when used with numeric operators).
@@ -1953,8 +1953,8 @@ jobstart( {cmd}[, {opts}]) Number Spawns {cmd} as a job
jobstop( {job}) Number Stops a job
jobwait( {ids}[, {timeout}]) Number Wait for a set of jobs
join( {list} [, {sep}]) String join {list} items into one String
-jsondecode( {expr}) any Convert {expr} from JSON
-jsonencode( {expr}) String Convert {expr} to JSON
+json_decode( {expr}) any Convert {expr} from JSON
+json_encode( {expr}) String Convert {expr} to JSON
keys( {dict}) List keys in {dict}
len( {expr}) Number the length of {expr}
libcall( {lib}, {func}, {arg}) String call {func} in library {lib} with {arg}
@@ -4314,12 +4314,12 @@ join({list} [, {sep}]) *join()*
converted into a string like with |string()|.
The opposite function is |split()|.
-jsondecode({expr}) *jsondecode()*
+json_decode({expr}) *json_decode()*
Convert {expr} from JSON object. Accepts |readfile()|-style
list as the input, as well as regular string. May output any
Vim value. When 'encoding' is not UTF-8 string is converted
from UTF-8 to 'encoding', failing conversion fails
- jsondecode(). In the following cases it will output
+ json_decode(). In the following cases it will output
|msgpack-special-dict|:
1. Dictionary contains duplicate key.
2. Dictionary contains empty key.
@@ -4327,7 +4327,7 @@ jsondecode({expr}) *jsondecode()*
dictionary and for string will be emitted in case string
with NUL byte was a dictionary key.
-jsonencode({expr}) *jsonencode()*
+json_encode({expr}) *json_encode()*
Convert {expr} into a JSON string. Accepts
|msgpack-special-dict| as the input. Converts from 'encoding'
to UTF-8 when encoding strings. Will not convert |Funcref|s,
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index b42b91140c..508712ca75 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -102,15 +102,19 @@ are always available and may be used simultaneously in separate plugins. The
5. (internal) Trying to print or stringify VAR_UNKNOWN in Vim results in
nothing, |E908|, in Neovim it is internal error.
-|jsondecode()| behaviour changed:
+|json_decode()| behaviour changed:
1. It may output |msgpack-special-dict|.
-2. It accepts only valid JSON. |v:none| is never emitted.
-|jsonencode()| behaviour slightly changed: now |msgpack-special-dict| values
-are accepted.
+2. |msgpack-special-dict| is emitted also in case of duplicate keys, while in
+ Vim it errors out.
+3. It accepts only valid JSON. Trailing commas are not accepted.
-*v:none* variable is absent. In Vim it represents “no value” in non-JSON
-strings like "{"a": }" parsed as "{'a': v:none}". See |jsondecode()| and
-|jsonencode()| incompatibilities above.
+|json_encode()| behaviour slightly changed: now |msgpack-special-dict| values
+are accepted, but |v:none| is not.
+
+*v:none* variable is absent. In Vim it represents “no value” in “js” strings
+like "[,]" parsed as "[v:none]" by |js_decode()|.
+
+*js_encode()* and *js_decode()* functions are also absent.
Viminfo text files were replaced with binary (messagepack) ShaDa files.
Additional differences: