import { msgpackdump } from "https://deno.land/x/denops_std@v4.1.4/function/nvim/mod.ts";
Convert a list of VimL objects to msgpack. Returned value is a
|readfile()|-style list. When {type} contains "B", a |Blob| is
returned instead. Example:
call writefile(msgpackdump([{}]), 'fname.mpack', 'b')
or, using a |Blob|:
call writefile(msgpackdump([{}], 'B'), 'fname.mpack')
This will write the single 0x80 byte to a fname.mpack
file
(dictionary with zero items is represented by 0x80 byte in
messagepack).
Limitations:
- |Funcref|s cannot be dumped.
- Containers that reference themselves cannot be dumped.
- Dictionary keys are always dumped as STR strings.
- Other strings and |Blob|s are always dumped as BIN strings.
- Points 3. and 4. do not apply to |msgpack-special-dict|s.