Skip to content

Commit cce7832

Browse files
committed
Parse JSON false as :json-false instead of nil
This would break code actions where the server sends us an action containing a `false` boolean parameter. `lsp-mode` would translate this into `nil`, and then send a `null` back to the language server. An example of this causing problems was emacs-lsp#4184. There may be parts of `lsp-mode` that expect `false` values to be parsed as `nil`, so any logic involving parsed booleans may need to be updated.
1 parent 9c3ebe4 commit cce7832

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lsp-mode.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6740,7 +6740,7 @@ server. WORKSPACE is the active workspace."
67406740
'plist
67416741
'hash-table)
67426742
:null-object nil
6743-
:false-object nil)
6743+
:false-object :json-false)
67446744
`(let ((json-array-type 'vector)
67456745
(json-object-type (if lsp-use-plists
67466746
'plist
@@ -6757,7 +6757,7 @@ server. WORKSPACE is the active workspace."
67576757
'plist
67586758
'hash-table)
67596759
:null-object nil
6760-
:false-object nil)
6760+
:false-object :json-false)
67616761
`(let ((json-array-type 'vector)
67626762
(json-object-type (if lsp-use-plists
67636763
'plist
@@ -8626,7 +8626,7 @@ When ALL is t, erase all log buffers of the running session."
86268626
(done (lsp--handle-process-exit workspace ""))))))
86278627
:object-type object-type
86288628
:null-object nil
8629-
:false-object nil))
8629+
:false-object :json-false))
86308630
"*json-rpc-connection*"))
86318631
(cons con con)))
86328632

0 commit comments

Comments
 (0)