Liking cljdoc? Tell your friends :D

lsp4clj.lsp.responses


errorclj

(error response body)

Indicate that a JSON-RPC response was an error by adding a error to it.

The body should conform to the JSON-RPC spec for error objects, which can be constructed with the helpers in lsp4clj.lsp.errors.

Indicate that a JSON-RPC response was an error by adding a error to it.

The body should conform to the JSON-RPC spec for error objects, which can be
constructed with the helpers in `lsp4clj.lsp.errors`.
sourceraw docstring

inferclj

(infer response body)

Infer whether to update the response with result or error depending on the shape of the body.

If body is a map containing the key :error, uses the value as the error body. Otherwise uses body as the result.

Infer whether to update the response with `result` or `error` depending on
the shape of the `body`.

If `body` is a map containing the key `:error`, uses the value as the `error`
body. Otherwise uses `body` as the `result`.
sourceraw docstring

preserve-kebab-caseclj

(preserve-kebab-case m)

Recursively convert map keywords to kebab-case strings, to avoid automatic camelCase conversion. This is useful for servers when the client expects Clojure style JSON, or when a map needs to be round-tripped from the server to the client and back without case changes.

Recursively convert map keywords to kebab-case strings, to avoid automatic
camelCase conversion. This is useful for servers when the client expects
Clojure style JSON, or when a map needs to be round-tripped from the server to
the client and back without case changes.
sourceraw docstring

responseclj

(response id)
(response id body)

Create a JSON-RPC response object. A response should be extend with a :result or :error either by using the arity-2 version, or via the helpers result, error, or infer.

https://www.jsonrpc.org/specification#response_object

Create a JSON-RPC response object. A response should be extend with a
`:result` or `:error` either by using the arity-2 version, or via the helpers
`result`, `error`, or `infer`.

https://www.jsonrpc.org/specification#response_object
sourceraw docstring

resultclj

(result response body)

Indicate that a JSON-RPC response was successful by adding a result to it.

Indicate that a JSON-RPC response was successful by adding a result to it.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close