Justin M. Keyes
8d4a53fe6e
fix(vim.json)!: remove global options, "null", "array_mt" #24070
...
Problem:
- `vim.json` exposes various global options which:
- affect all Nvim Lua plugins (especially the LSP client)
- are undocumented and untested
- can cause confusing problems such as: cc76ae3abe
- `vim.json` exposes redundant mechanisms:
- `vim.json.null` is redundant with `vim.NIL`.
- `array_mt` is redundant because Nvim uses a metatable
(`vim.empty_dict()`) for empty dict instead, which `vim.json` is
configured to use by default (see `as_empty_dict`).
Example:
```
:lua vim.print(vim.json.decode('{"bar":[],"foo":{}}'))
--> { bar = {}, foo = vim.empty_dict() }
```
Thus we don't need to also decorate empty arrays with `array_mt`.
Solution:
Remove the functions from the public vim.json interface.
Comment-out the implementation code to minimize drift from upstream.
TODO:
- Expose the options as arguments to `vim.json.new()`
2023-06-21 01:10:32 -07:00
..
2023-06-19 08:40:33 -07:00
2022-10-18 07:18:44 -07:00
2023-06-11 12:40:22 +01:00
2023-06-19 08:40:33 -07:00
2023-04-23 15:22:55 +02:00
2023-06-19 08:40:33 -07:00
2023-06-11 12:40:22 +01:00
2019-05-09 20:27:11 -04:00
2023-06-19 08:40:33 -07:00
2022-12-02 16:05:00 +01:00
2023-06-19 08:40:33 -07:00
2023-04-17 12:53:34 +01:00
2023-04-17 15:46:24 +08:00
2023-04-23 15:22:55 +02:00
2023-06-19 02:24:44 -07:00
2023-04-04 19:07:33 +02:00
2023-06-11 12:40:22 +01:00
2023-05-11 15:43:02 +08:00
2023-04-23 15:22:55 +02:00
2022-10-14 08:01:13 -07:00
2021-09-10 08:48:27 +02:00
2023-05-13 21:33:22 +02:00
2022-10-29 17:41:22 +02:00
2023-01-01 15:05:13 +01:00
2023-04-23 15:22:55 +02:00
2023-02-28 15:14:03 +01:00
2023-06-03 12:06:00 +02:00
2023-05-13 21:33:22 +02:00
2023-04-29 09:20:52 +08:00
2023-05-15 09:38:32 +02:00
2023-04-29 09:20:52 +08:00
2023-05-13 21:33:22 +02:00
2023-04-13 12:15:30 +02:00
2023-06-19 02:24:44 -07:00
2023-05-13 21:33:22 +02:00
2023-05-13 21:33:22 +02:00
2023-06-20 21:17:13 +02:00
2023-06-02 22:59:58 +08:00
2023-06-21 01:10:32 -07:00
2023-06-02 22:59:58 +08:00
2023-06-03 12:06:00 +02:00
2023-06-19 08:40:33 -07:00
2023-01-01 15:05:13 +01:00
2022-12-05 21:09:31 +08:00
2022-10-14 08:01:13 -07:00
2023-02-22 00:07:26 +08:00
2023-04-07 16:11:02 +02:00
2023-06-21 01:10:32 -07:00
2023-06-11 12:40:22 +01:00
2022-12-11 18:41:26 -08:00
2023-06-19 08:40:33 -07:00
2023-06-19 08:40:33 -07:00
2018-10-29 09:55:07 +01:00
2023-05-05 18:15:44 +02:00
2022-10-06 06:16:00 -07:00
2023-05-15 09:38:32 +02:00
2018-10-29 09:55:07 +01:00
2023-01-01 15:05:13 +01:00
2023-05-13 21:33:22 +02:00
2015-08-15 15:25:30 -03:00
2023-04-23 15:22:55 +02:00
2023-06-02 22:59:58 +08:00
2023-05-13 21:33:22 +02:00
2023-05-02 13:11:26 +02:00
2023-04-23 15:22:55 +02:00
2023-02-22 00:07:26 +08:00
2023-02-21 23:50:29 +08:00
2023-06-11 12:40:22 +01:00
2023-01-01 15:05:13 +01:00
2023-06-19 08:40:33 -07:00
2022-07-06 19:34:24 +08:00
2023-05-13 21:33:22 +02:00
2023-06-11 12:40:22 +01:00
2023-06-19 08:40:33 -07:00
2023-04-04 19:07:33 +02:00
2023-05-13 21:33:22 +02:00
2022-09-26 17:43:23 +08:00
2023-02-20 15:12:59 +08:00
2022-12-02 16:05:00 +01:00
2023-05-15 09:38:32 +02:00
2023-01-01 15:05:13 +01:00
2023-06-06 08:23:20 -07:00
2023-02-21 23:50:29 +08:00
2023-06-19 02:24:44 -07:00
2022-07-26 11:26:23 +02:00
2023-06-11 12:40:22 +01:00
2023-05-15 09:38:32 +02:00
2023-02-21 23:50:29 +08:00
2023-04-23 15:22:55 +02:00
2022-02-24 18:13:44 +08:00
2023-04-11 19:10:36 +02:00
2023-01-03 10:07:43 +00:00
2022-02-24 18:13:44 +08:00
2023-01-01 15:05:21 +01:00
2023-04-13 12:15:30 +02:00
2023-01-01 15:05:21 +01:00
2023-06-19 08:40:33 -07:00
2021-05-02 12:53:49 -04:00
2023-01-01 15:05:21 +01:00
2023-01-01 15:05:21 +01:00
2023-02-21 23:50:29 +08:00
2021-05-01 22:29:03 -04:00
2021-04-27 09:21:33 -04:00
2023-01-01 15:05:21 +01:00
2018-10-29 10:01:44 +01:00
2021-04-29 09:27:19 -04:00
2018-10-29 10:01:44 +01:00
2023-01-01 15:05:21 +01:00
2023-01-01 15:05:21 +01:00
2021-04-29 20:42:16 -04:00
2023-01-01 15:05:21 +01:00
2023-01-01 15:05:21 +01:00
2023-05-04 17:40:29 +08:00
2023-01-01 15:05:21 +01:00
2019-03-26 19:55:33 +01:00
2021-04-27 09:21:34 -04:00
2023-06-19 08:40:33 -07:00
2023-01-03 10:07:43 +00:00
2023-06-19 08:40:33 -07:00
2023-01-03 10:07:43 +00:00
2023-06-19 02:24:44 -07:00
2023-05-13 21:33:22 +02:00
2023-02-22 00:07:26 +08:00