aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/eval.txt12
-rw-r--r--runtime/doc/vim_diff.txt6
2 files changed, 18 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 572cf4c03f..25005885c3 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1960,6 +1960,7 @@ 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
keys( {dict}) List keys in {dict}
len( {expr}) Number the length of {expr}
@@ -4320,6 +4321,17 @@ join({list} [, {sep}]) *join()*
converted into a string like with |string()|.
The opposite function is |split()|.
+jsondecode({expr}) *jsondecode()*
+ Convert {expr} from JSON object. Accepts |readfile()|-style
+ list as the input, as well as regular string. May output any
+ Vim value. In the following cases it will output
+ |msgpack-special-dict|:
+ 1. Dictionary contains duplicate key.
+ 2. Dictionary contains empty key.
+ 3. String contains NUL byte. Two special dictionaries: for
+ dictionary and for string will be emitted in case string
+ with NUL byte was a dictionary key.
+
jsonencode({expr}) *jsonencode()*
Convert {expr} into a JSON string. Accepts
|msgpack-special-dict| as the input. Will not convert
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 17ee5975dd..ddb1fd3b8f 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -100,6 +100,12 @@ are always available and may be used simultaneously in separate plugins. The
4. Stringifyed infinite and NaN values now use |str2float()| and can be evaled
back.
+|jsondecode()| 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.
+
Viminfo text files were replaced with binary (messagepack) ShaDa files.
Additional differences: