1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 22:30:05 +08:00
SpaceVim/test/api/data/json.vader

8 lines
368 B
Plaintext
Raw Normal View History

2017-10-23 23:30:24 +08:00
Execute ( SpaceVim api: data#json ):
let json = SpaceVim#api#import('data#json')
2020-08-29 16:46:57 +08:00
let context = '{"java" : "hello world"}'
AssertEqual json.json_decode(context).java, 'hello world'
let context = '{"java" : true}'
AssertEqual json.json_decode(context).java, get(v:, 'true', 1)
2017-10-24 00:03:57 +08:00
AssertEqual json.json_decode(json.json_encode({'foo' : 'zaa'})), {'foo' : 'zaa'}