OmniSharp / OmniSharp/csharp-language-server-protocol
Odd behaviour when just syncing a date string
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 638
- Forks
- 109
- Avg merge
- 1m
- Merged PRs (30d)
- 2
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!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at TextDocumentSyncHandler.Handle and trace the JSON-RPC notification deserialization used by the incoming handler. Reproduce the issue with a pasted yyyy-MM-ddTHH:mm:ss value and compare the received text with the outgoing contentChanges payload. Done means the behavior or configuration path is documented and covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend-api-design, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100