Skip to content

Commit 009d84a

Browse files
committed
patch 7.4.1188
Problem: Using older JSON standard. Solution: Update the link. Adjust the text a bit.
1 parent 85be35f commit 009d84a

3 files changed

Lines changed: 16 additions & 18 deletions

File tree

runtime/doc/eval.txt

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 7.4. Last change: 2016 Jan 24
1+
*eval.txt* For Vim version 7.4. Last change: 2016 Jan 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2842,6 +2842,7 @@ empty({expr}) *empty()*
28422842
Return the Number 1 if {expr} is empty, zero otherwise.
28432843
A |List| or |Dictionary| is empty when it does not have any
28442844
items. A Number is empty when its value is zero.
2845+
|v:false|, |v:none| and |v:null| are empty, |v:true| is not.
28452846
For a long |List| this is much faster than comparing the
28462847
length with zero.
28472848

@@ -4252,16 +4253,21 @@ jsondecode({string}) *jsondecode()*
42524253
JSON and Vim values.
42534254
The decoding is permissive:
42544255
- A trailing comma in an array and object is ignored.
4255-
- An empty item in an array results in v:none.
4256-
- When an object name is not a string it is converted to a
4257-
string. E.g. the number 123 is used as the string "123".
4256+
- An empty item in an array, two commas with nothing or white
4257+
space in between, results in v:none.
4258+
- When an object member name is not a string it is converted
4259+
to a string. E.g. the number 123 is used as the string
4260+
"123".
42584261
- More floating point numbers are recognized, e.g. "1." for
42594262
"1.0".
4263+
The result must be a valid Vim type:
4264+
- An empty object member name is not allowed.
4265+
- Duplicate object member names are not allowed.
42604266

42614267
jsonencode({expr}) *jsonencode()*
42624268
Encode {expr} as JSON and return this as a string.
42634269
The encoding is specified in:
4264-
http://www.ietf.org/rfc/rfc4627.txt
4270+
https://tools.ietf.org/html/rfc7159.html
42654271
Vim values are converted as follows:
42664272
Number decimal number
42674273
Float floating point number
@@ -5889,18 +5895,8 @@ shellescape({string} [, {special}]) *shellescape()*
58895895
shiftwidth() *shiftwidth()*
58905896
Returns the effective value of 'shiftwidth'. This is the
58915897
'shiftwidth' value unless it is zero, in which case it is the
5892-
'tabstop' value. To be backwards compatible in indent
5893-
plugins, use this: >
5894-
if exists('*shiftwidth')
5895-
func s:sw()
5896-
return shiftwidth()
5897-
endfunc
5898-
else
5899-
func s:sw()
5900-
return &sw
5901-
endfunc
5902-
endif
5903-
< And then use s:sw() instead of &sw.
5898+
'tabstop' value. This function was introduced with patch
5899+
7.3.694 in 2012, everybody should have it by now.
59045900

59055901

59065902
simplify({filename}) *simplify()*

src/json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/*
1111
* json.c: Encoding and decoding JSON.
1212
*
13-
* Follows this standard: http://www.ietf.org/rfc/rfc4627.txt
13+
* Follows this standard: https://tools.ietf.org/html/rfc7159.html
1414
*/
1515

1616
#include "vim.h"

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,8 @@ static char *(features[]) =
746746

747747
static int included_patches[] =
748748
{ /* Add new patch number below this line */
749+
/**/
750+
1188,
749751
/**/
750752
1187,
751753
/**/

0 commit comments

Comments
 (0)