Skip to content

Commit

Permalink
runtime(json): fix examples in comments for JSON formatting (#13660)
Browse files Browse the repository at this point in the history
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
  • Loading branch information
habamax committed Dec 11, 2023
1 parent ca7c9b1 commit 34b9a15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runtime/autoload/dist/json.vim
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,19 @@ enddef

# Format JSON string or dict/list as JSON
# import autoload 'dist/json.vim'
# echo json.FormatStr('{"hello": "world"}', {use_tabs: false, indent: 2, indent_base: 0})
# echo json.Format('{"hello": "world"}', {use_tabs: false, indent: 2, indent_base: 0})

# {
# "hello": "world"
# }

# echo json.FormatStr({'hello': 'world'}, {use_tabs: false, indent: 2, indent_base: 0})
# echo json.Format({'hello': 'world'}, {use_tabs: false, indent: 2, indent_base: 0})
# {
# "hello": "world"
# }
#
# Note, when `obj` is dict, order of the `key: value` pairs might be different:
# echo json.FormatStr({'hello': 1, 'world': 2})
# echo json.Format({'hello': 1, 'world': 2})
# {
# "world": 2,
# "hello": 1
Expand Down

0 comments on commit 34b9a15

Please sign in to comment.