1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 06:20:05 +08:00
SpaceVim/test/api/data/json.vader
2020-08-29 16:46:57 +08:00

8 lines
368 B
Plaintext

Execute ( SpaceVim api: data#json ):
let json = SpaceVim#api#import('data#json')
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)
AssertEqual json.json_decode(json.json_encode({'foo' : 'zaa'})), {'foo' : 'zaa'}