diff options
author | ZyX <kp-pav@yandex.ru> | 2016-02-01 21:22:07 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2016-04-18 02:45:49 +0300 |
commit | e213ba150665328bae2b532491de5e12f72bc9ca (patch) | |
tree | 5baab21c126996e91aca54285498067f17831172 /runtime/doc/eval.txt | |
parent | 0f0e2bdfd4b99d678cbcd090505ae9ebf74233a2 (diff) | |
download | rneovim-e213ba150665328bae2b532491de5e12f72bc9ca.tar.gz rneovim-e213ba150665328bae2b532491de5e12f72bc9ca.tar.bz2 rneovim-e213ba150665328bae2b532491de5e12f72bc9ca.zip |
eval: Add jsondecode() function
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r-- | runtime/doc/eval.txt | 12 |
1 files changed, 12 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 |