rest-nvim / rest.nvim

A fast Neovim http client written in Lua
GNU General Public License v3.0
1.61k stars 142 forks source link

refactor: remove luanil opts for vim.json.decode #377

Closed aktersnurra closed 6 months ago

aktersnurra commented 6 months ago

This PR removes the luanil opts from the vim.json.decode, since when they are provided all instances of key-value pairs with null values are removed, see my issue in neovim. lua-tables cannot hold nil values:

Like indices, the value of a table field can be of any type (except `nil`). In
particular, because functions are first-class values, table fields may contain
functions. Thus tables may also carry methods (see |lua-function-define|).

which is the root cause to this behavior.