-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Description
We're using the LSP library in combination with a WebSocket connection and the JSON RPC integration.
In the frontend, we have a monaco editor running connecting to the LSP. When just pasting a date in the format yyyy-MM-ddTHH:mm:ss, e.g. 2026-11-14T13:00:00, it seems like the JSON deserializer parses the string as a date and within the sync handler, we receive a date in a new format (see below).
This is the outgoing message:
{
"jsonrpc": "2.0",
"method": "textDocument/didChange",
"params": {
"textDocument": {
"uri": "inmemory://f6eea487-d551-4046-ada9-9bd285336889/585c22d8-fe2d-4260-865b-1f9bef806c07/2937aaba-b860-4a01-8613-51dbbf0b2f3d",
"version": 3
},
"contentChanges": [
{
"range": {
"start": { "line": 6, "character": 0 },
"end": { "line": 6, "character": 0 }
},
"rangeLength": 0,
"text": "2026-11-14T13:00:00"
}
]
}
}
This is what we receive in the backend in TextDocumentSyncHandler.Handle (no user code running in between):
I could not find a way of configuring the default date parse handling for the incoming notification handler.
Does anyone have an idea of how to deal with this issue?
Many thanks in advance!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels