microsoft / microsoft/language-server-protocol
Clarification on serialization of `integer` typed `number`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1k
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 10
Description
LSP communicates through JSON so there is no native integer type. To compensate for that we have a custom type def integer.
LSP does not make any statements about additional json extensions, so I assume that standard JSON semantics apply, which would mean that a number serialized as 1.0 is semantically equivalent a number serialized as 1 and thus a valid integer.
This is documented for Json Schema, but since LSP does not use Json Schema in contrast to DAP, I'd like to confirm that the same applies to LSP as well.
I'd also be great to have this clarification added to the description of integer as well.
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
Search the protocol definitions for the custom integer type and read its current description. Use the JSON semantics described in the issue to determine whether 1.0 should be documented as valid for LSP integers. Done means the description clearly records the agreed interpretation; confirmation is still outstanding because the issue has no comments or linked pull request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100